Re: [SQL] passing values into .sql scripts

2005-09-15 Thread Geoffrey Knauth
That did exactly what I wanted. Thank you! (I had tried \set acct ... before, but it was your quoting that fixed my problem.) Geoffrey -- Geoffrey S. Knauth | http://knauth.org/gsk On Sep 15, 2005, at 18:43, Michael Fuhr wrote: What's your intention here? The above sets the variable tmp

Re: [SQL] passing values into .sql scripts

2005-09-15 Thread Michael Fuhr
On Thu, Sep 15, 2005 at 05:27:52PM -0400, Geoffrey Knauth wrote: > I want to do something like this: > > \set tmp :acct 'a value' What's your intention here? The above sets the variable tmp to the value of the variable acct concatenated with 'a value', but you don't show acct being set anywh

[SQL] passing values into .sql scripts

2005-09-15 Thread Geoffrey Knauth
I want to do something like this: \set tmp :acct 'a value' \i query.sql where query.sql looks like this: select sum(amount), dr_acct from ledger where dr_acct = :acct group by dr_acct; select sum(amount), cr_acct from ledger where cr_acct = :acct group by cr_acct; selec