Forgot to mention what error I am getting.

near "order": syntax error 
near "limit": syntax error - if i remove the order by clause

 VENKAT




________________________________
From: venkat easwar <hareas...@yahoo.com>
To: General Discussion of SQLite Database <sqlite-users@sqlite.org>
Sent: Tue, February 15, 2011 4:32:40 PM
Subject: [sqlite] UPDATE WITH ORDER BY LIMIT ERROR

Hi Buddies,

Sqlite support document says, update with limit and order by clauses are 
supported. But I found it actually not working. Sample DB schema,

create table check_update( a int, b char);
insert into check_update values (1,'venkat',22);
insert into check_update values (2,'venkat',23);

Now a update like this

update check_update set b='venkat n' where b='venkat' order by a limit 1;

should actually update the first row but not the second one as per document 
http://www.sqlite.org/syntaxdiagrams.html#update-stmt-limited 


The scenario is given just for reproduction, my actual scenes are different and 
which needs this implementation. :( 


Well, now am I missing something in the update.

VENKAT



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



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

Reply via email to