April 2, 2003 at 11:00 am
Hello,
I need to delete records from a table that match the results of the following query:
*************************************
(SELECT CL.Permnum AS CLPermnum, SD.Permnum AS SDPermnum
FROM tblCLTestScoresTEMP CL LEFT outer join student_data_Main SD
ON CL.Permnum=SD.Permnum WHERE SD.permnum IS null)
*************************************
This query shows me 'Permnum' from tblCLTestScoresTEMP that have no matching 'Permnum' in Student_Data_Main, and I need to delete these records from tblCLTestScoresTemp.
I have tried a few things with 'IN' and 'EXISTS', but I continue to receive errors.
Please send along suggestions for how I might accomplish this delete. Thanks.
CSDunn
April 2, 2003 at 12:20 pm
DELETE tblCLTestScoresTEMP
FROM tblCLTestScoresTEMP CL LEFT outer join student_data_Main SD
ON CL.Permnum=SD.Permnum WHERE SD.permnum IS null
Jay Madren
Jay Madren
April 2, 2003 at 2:43 pm
Thanks for your help! CSDunn
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply