Re: [sqlite] Any equivalent to MSSQL's UPDATE..FROM.. clause ?

2008-08-22 Thread Samuel Neff
Thanks, I didn't think REPLACE would work here but you're right, it does do exactly what I need. Best regards, Sam - We're Hiring! Seeking passionate Flex, C#, or C++ (RTSP, H264) developer in the Washington D.C. Contact [EMAIL

Re: [sqlite] Any equivalent to MSSQL's UPDATE..FROM.. clause ?

2008-08-22 Thread Francis GAYREL
I met the same issue. REPLACE is the right way to override it. Assuming C1 is the primary key or at least unique, instead of UPDATE T1 INNER JOIN T2 ON T1.C1=T2.C1 SET T1.C2=T2.C2 WHERE T1.C2<>T2.C2; you can write: REPLACE INTO T1 SELECT T1.C1,T2.C2,C3,C4 FROM T1 INNER JOIN T2 ON T1.C1=T2.C1

[sqlite] Any equivalent to MSSQL's UPDATE..FROM.. clause ?

2008-08-21 Thread Samuel Neff
I'm trying to update records in one table based on joined data in another table. MSSQL has support for a "FROM" clause within an UPDATE statement which makes this type of thing very easy. Is there any equivalent in SQLite? The only way I've found to achive the same results is to use a subselect