On Fri, Jun 17, 2011 at 5:05 PM, Mr. Puneet Kishor <punk.k...@gmail.com> wrote: > The above is not SQL. You can't have a SQL statement begin with CASE. SQL > statements can only begin with either SELECT or UPDATE or CREATE or DELETE or > ALTER, etc. CASE is an expression, and has to be a replacement for a column. > I can't even begin to help you rewrite your statement, but what you are > trying to accomplish is something like -- > > if (some condition) > UPDATE this > else > UPDATE that > > Either accomplish the above in a programming language, or rewrite it as > separate queries, or hope Igor or someone can help you rewrite the above into > a single query.
Rewrite the statements as: INSERT ... WHERE ... AND <some condition>; Similarly for SELECT, UPDATE, and DELETE. Nico -- _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users