Re: [sqlite] Using pragma user_version when doing updates

2013-09-17 Thread Scott Robison
Could be an interesting virtual table module... On Tue, Sep 17, 2013 at 6:24 PM, Darren Duncan wrote: > On 2013.09.17 4:28 PM, Richard Hipp wrote: > >> On Tue, Sep 17, 2013 at 7:13 PM, Amit wrote: >> >> Hello, >>> >>> I would like to run the following update statement >>> if pragma user_versio

Re: [sqlite] Using pragma user_version when doing updates

2013-09-17 Thread Darren Duncan
On 2013.09.17 4:28 PM, Richard Hipp wrote: On Tue, Sep 17, 2013 at 7:13 PM, Amit wrote: Hello, I would like to run the following update statement if pragma user_version == 2. How can I incorporate that in this query? UPDATE pass_key SET key = (SELECT textval FROM saved.pass_key b WHERE b.fi

Re: [sqlite] Using pragma user_version when doing updates

2013-09-17 Thread Amit
Richard Hipp writes: > > You can access the user version using "PRAGMA user_version". > Unfortunately, you cannot combine a pragma with a larger query. > Yes, I feared as much. Thanks for the response, Amit ___ sqlite-users mailing list sqlite-user

Re: [sqlite] Using pragma user_version when doing updates

2013-09-17 Thread Richard Hipp
On Tue, Sep 17, 2013 at 7:13 PM, Amit wrote: > Hello, > > I would like to run the following update statement > if pragma user_version == 2. > > How can I incorporate that in this query? > > UPDATE pass_key > SET key = (SELECT textval FROM saved.pass_key b WHERE b.field='key') > WHERE name="KeyLoc

[sqlite] Using pragma user_version when doing updates

2013-09-17 Thread Amit
Hello, I would like to run the following update statement if pragma user_version == 2. How can I incorporate that in this query? UPDATE pass_key SET key = (SELECT textval FROM saved.pass_key b WHERE b.field='key') WHERE name="KeyLock"; I've tried using CASE..WHEN..ELSE but it doesn't seem to li

[sqlite] Using pragma user_version

2005-05-26 Thread Damian Slee
Hi, In the sqlite wiki below it describes the use of pragma user_version, but doesn't really say how to use it. I'm evaluating the latest sqlite.exe. Say on initial creation of me DB I set user_version to 1. then product with DB schema 1 gets released. Then at some point in the future I want