On Tue, Sep 17, 2013 at 7:13 PM, Amit <[email protected]> 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="KeyLock";
>
> I've tried using CASE..WHEN..ELSE but it doesn't seem to
> like the pragma statement in there.
>

You can access the user version using "PRAGMA user_version".
Unfortunately, you cannot combine a pragma with a larger query.

-- 
D. Richard Hipp
[email protected]
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to