If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Multiple Tables Delete HELP

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-17-04, 08:32
sylviasue sylviasue is offline
Registered User
 
Join Date: Mar 2004
Location: Kuwait
Posts: 4
Multiple Tables Delete HELP

Hi All

I am trying to do a delete for a row where the the condition relate to two tables. In my reading i found an example using left join for a select and it's equivalent delete statement. I tried the same thing on my db, my select statement worked fine but my delete statement didn't and it was the delete statement i was interested in.

Select statement;
SELECT t_profit_payment.* from t_profit_payment LEFT JOIN t_repayment ON t_profit_payment.AcctID = t_repayment.AcctID where t_repayment.ID = 29

Delete Statement
DELETE t_profit_payment from t_profit_payment LEFT JOIN t_repayment ON t_profit_payment.AcctID = t_repayment.AcctID where t_repayment.ID = 29

IF anyone can help it would be most appreciated.

Thanks in advance
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On