Delete Query

neilmcmor

Registered User.
Local time
Today, 04:53
Joined
Aug 9, 2007
Messages
70
I am trying to run the following sql but where there should be 54 records for deleting I keep getting 0 records will be deleted. I used an findunmatch query to establish tat there where 54 records unmatched. Can somen tell me whether the sql below is correct. I am Very new at this

DELETE *
FROM Status
WHERE (((Status.Spin) Not In (Select Spin From tbl1)));
 
It looks okay offhand. There are 54 records in tbl1? If so, you may be running into a referential integrity problem, where there are records in other tables related to the records you're trying to delete.
 
there is no relationship as tbl1 is a temp table used for importing excel data
 
I mean related to the status table, since that's where records are being deleted from.
 

Users who are viewing this thread

Back
Top Bottom