Title: Message
I added a UniqueID field to tblWorking and then modified my query as follows:
 
 DELETE FROM tblWorking
 WHERE UniqueID IN
  (SELECT tblWorking.UniqueID
   FROM tblWorking JOIN tblBudgetHistory
   ON tblBudgetHistory.sort = tblWorking.sort
   AND tblBudgetHistory.newpno = tblWorking.newpno
   AND tblBudgetHistory.perioddate = tblWorking.perioddate
   AND tblBudgetHistory.sort BETWEEN 24 and 26)
It appears to be doing what I want now.
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Richard Rogers Beasimer
Sent: Monday, June 27, 2005 16:33
To: AccessDevelopers@yahoogroups.com; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: [SQL_beginners] Delete Statement
Importance: Low

I about ready to give up on this.
 
What's wrong with my delete statement?
 
DELETE FROM tblWorking
WHERE tblWorking.sort = tblBudgetHistory.sort
and tblWorking.newpno = tblBudgetHistory.newpno
AND tblWorking.perioddate = tblBudgetHistory.perioddate
The idea is to remove every entry in tblWorking that has a corresponding entry in tblBudgetHistory.
 

RRB

 
NOTICE: This e-mail message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure, or distribution is prohibited. The contents of this e-mail are confidential. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. Please virus check all attachments to prevent widespread contamination and corruption of files and operating systems!
NOTICE: This e-mail message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure, or distribution is prohibited. The contents of this e-mail are confidential. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. Please virus check all attachments to prevent widespread contamination and corruption of files and operating systems!



Please zip all files prior to uploading to Files section.




YAHOO! GROUPS LINKS




Reply via email to