Re: [sqlite] insert if in SQL cmd

2012-10-23 Thread Arbol One
of the code. Genius might have limitations, but stupidity is no handicap -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of YAN HONG YE Sent: Monday, October 22, 2012 10:01 PM To: sqlite-users@sqlite.org Subject: [sqlite] insert

Re: [sqlite] insert if in SQL cmd

2012-10-22 Thread Igor Tandetnik
YAN HONG YE wrote: > I need a function to run step 2 in sql cmd, but I don't know how to write in > the sql environment. > > 1. BEGIN TRANSACTION; > 2. if today is mondy to fridy,then run 3-6 >ELSE run 6. > 3. prepare and step stmt A (SELECT * FROM foo WHERE rowid=1), A

Re: [sqlite] insert if in SQL cmd

2012-10-22 Thread Simon Slavin
On 23 Oct 2012, at 3:01am, YAN HONG YE wrote: > 3. prepare and step stmt A (SELECT * FROM foo WHERE rowid=1), A is not > finalized or reset; > 4. execute stmt B (DELETE FROM foo WHERE rowid=1), B is prepared, executed > and finalized; > 5. access column data via stmt A

[sqlite] insert if in SQL cmd

2012-10-22 Thread YAN HONG YE
I need a function to run step 2 in sql cmd, but I don't know how to write in the sql environment. 1. BEGIN TRANSACTION; 2. if today is mondy to fridy,then run 3-6 ELSE run 6. 3. prepare and step stmt A (SELECT * FROM foo WHERE rowid=1), A is not finalized or reset; 4. execute stmt B (DELETE