RE: Multi-table deletes

2008-07-18 Thread David Ruggles
] Sent: Friday, July 18, 2008 11:51 AM To: 'mysql' Subject: Multi-table deletes My SQL: delete c, gt, g, sp from Companies as c, GroupTypes as gt, Groups as g, ServicePersons as sp where gt.companyuid = c.uid and g.companyuid = c.uid and sp.

Multi-table deletes

2008-07-18 Thread David Ruggles
My SQL: delete c, gt, g, sp from Companies as c, GroupTypes as gt, Groups as g, ServicePersons as sp where gt.companyuid = c.uid and g.companyuid = c.uid and sp.companyuid = c.uid and c.id = '01' This works fine as long as there are records in all t

Re: Multi-table deletes

2002-06-18 Thread Victoria Reznichenko
Bhavin, Saturday, June 15, 2002, 2:36:07 AM, you wrote: BV> Just wanted to make sure before I proceed to write a script, BV> Muti-table deletes as such: BV> delete from Keyname_Keyvalue,Keyvalue WHERE BV> Keyvalue.KeyvalueKey=Keyname_Keyvalue.KeyvalueKey AND BV> Keyname_Keyvalue.KeynameKey='100'

Multi-table deletes

2002-06-14 Thread Bhavin Vyas
Just wanted to make sure before I proceed to write a script, Muti-table deletes as such: delete from Keyname_Keyvalue,Keyvalue WHERE Keyvalue.KeyvalueKey=Keyname_Keyvalue.KeyvalueKey AND Keyname_Keyvalue.KeynameKey='100'; ERROR 1064: You have an error in your SQL syntax near 'Keyvalue WHERE Keyv