RE: [sqlite] how to do this case when?

2008-01-31 Thread RB Smissaert
Found this now: UPDATE Table1 SET Field1 = (case when Field1 IN (SELECT Field1 FROM Table2) then (SELECT Field2 FROM Table2 WHERE Table1.Field1 = Table2.Field1) else Table1.Field1 end) Have a feeling though that this can be shorter. RBS -Original

RE: [sqlite] how to do this case when?

2008-01-31 Thread Fowler, Jeff
At the end (outside the subquery), add: WHERE Field1 IN (SELECT Field1 FROM Table2) - Jeff -Original Message- From: RB Smissaert [mailto:[EMAIL PROTECTED] Sent: Thursday, January 31, 2008 3:15 PM To: sqlite-users@sqlite.org Subject: [sqlite] how to do this case when? How do I alter