tags:

views:

77

answers:

1

How would I convert the following statement from MySQL-ese to SQLite-ese?

UPDATE Attribute, Name 
  SET Attribute.AttValue = 'foobar'
  WHERE Attribute.NameID = Name.NameID 
    AND Name.Name = 'rotate_ccw'

It looks like SQLite doesn't support joins in an UPDATE statement.

+3  A: 
UPDATE Attribute
  SET Attribute.AttValue = 'foobar'
  WHERE Attribute.NameID = (SELECT Name.NameID FROM Name WHERE Name.Name = 'rotate_ccw')
Chris McCall
ah, ok, I didn't know you could do that. I'll try that....
Jason S