On 10 May 2010, at 9:25pm, Adam DeVita wrote:

> Simon, can you expand your syntax, or are you just saying, "get x,y,z  store
> them in a set of variables, then run update with appropriate bindings"?

Just that.  You have a programming language with variables, so use it.  That's 
what your programming language is for.

You might be able to get extremely clever and work out some contorted SQLite 
syntax which will do the whole thing in one SQL command, but why bother ?  
It'll be hell to work out what's wrong if you get an error message.  And it'll 
be difficult to document because you have to explain your perverse syntax.  
Better to use two extremely simple SQL commands and say "We get three values 
here ... then we use them in this UPDATE.".  Faster and simpler to write, debug 
and document.

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to