Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Deleting rows in table based on linked criteria

Status
Not open for further replies.

blinder

Programmer
Oct 16, 2002
13
NZ
Hi Experts...
URGENT REQUEST FOR HELP
Version mySQL 3.23.51-nt

I have two tables (a master and a slave). I want to delete rows from the slave based on criteria in the master.

I tried updating the slave table with a value so that I could then use that value to delete from slave where value='DELETE'
I know that the delete from more than one table is coming in version 4 - but that doesn't help me now
The update doesn't work
E.g.
UPDATE slave INNER JOIN master ON slave.MasterID = master.MasterID SET slave.delete = "DELETE"
WHERE (((master.FinancialPeriod)="2003Week22"));

Any help will do...

Blinder
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top