Re: [sqlite] Parameterized SQL

2012-06-15 Thread Don V Nielsen
I use Ruby. In the following example I use a replacement tag "#{lvl}" in the scripts. For each of the levels (indv,hhld,resi), I do a substitution against the script and pass the script to sqlite. dbname = File.join('d:','cloveretl','projects','test_ii','data-out-97','test.db') db =

Re: [sqlite] Parameterized SQL

2012-06-15 Thread Niall O'Reilly
On 15 Jun 2012, at 10:45, Udi Karni wrote: > Niall - thanks. If I understand correctly - you use bash to do the > preprocessing of the substitutions and submit the prepared statements to > Sqlite. Well, 'prepared' is not the term I would use, as it has a specific meaning in the

Re: [sqlite] Parameterized SQL

2012-06-15 Thread Udi Karni
Niall - thanks. If I understand correctly - you use bash to do the preprocessing of the substitutions and submit the prepared statements to Sqlite. On Fri, Jun 15, 2012 at 1:48 AM, Niall O'Reilly wrote: > > On 14 Jun 2012, at 22:16, Udi Karni wrote: > > > Is there a way to

Re: [sqlite] Parameterized SQL

2012-06-15 Thread Niall O'Reilly
On 14 Jun 2012, at 22:16, Udi Karni wrote: > Is there a way to run SQL scripts in the Shell with parameters? > > Something like this? > > set = 2010 > > SELECT COUNT (*) FROM TABLE WHERE YEAR = ; > > ??? I use bash and sqlite3, as in the fragment below. #!/bin/bash #

Re: [sqlite] Parameterized SQL

2012-06-14 Thread Igor Tandetnik
On 6/14/2012 5:16 PM, Udi Karni wrote: Is there a way to run SQL scripts in the Shell with parameters? Something like this? set = 2010 SELECT COUNT (*) FROM TABLE WHERE YEAR = ; Not to my knowledge. -- Igor Tandetnik ___ sqlite-users mailing

[sqlite] Parameterized SQL

2012-06-14 Thread Udi Karni
Is there a way to run SQL scripts in the Shell with parameters? Something like this? set = 2010 SELECT COUNT (*) FROM TABLE WHERE YEAR = ; ??? ___ sqlite-users mailing list sqlite-users@sqlite.org