LittleSmudge
Programmer
I have two tables that are Import Quarantine tables populated from CSV files.
The tables are linked in a one to many relationship - but as I can't trust the validity of the data I cannot guarantee the referential integrity.
tblImportTest
TestId
field1
field2
etc.
tblImportContent
TestRef ForeignKey to tblImportTest.TestId
field1
field2
etc.
I want to create a patameter query that will delete any records for a matchine TestId from both tables ( IF they exist ) bit remember that I can't guarantee record will exist in either table.
I've tried
When I run this I get
"Could not delete from specified tables."
Is there any way of combining a Delete from the two tables into one query ?
G LS
spsinkNOJUNK@yahoo.co.uk
Remove the NOJUNK to use.
The tables are linked in a one to many relationship - but as I can't trust the validity of the data I cannot guarantee the referential integrity.
tblImportTest
TestId
field1
field2
etc.
tblImportContent
TestRef ForeignKey to tblImportTest.TestId
field1
field2
etc.
I want to create a patameter query that will delete any records for a matchine TestId from both tables ( IF they exist ) bit remember that I can't guarantee record will exist in either table.
I've tried
Code:
DELETE tblImportTest.*, tblImportContent.*
FROM tblImportTest, tblImportContent
WHERE tblImportTest.TestId = [Test Instance ID To Be DELETED]
AND tblImportContent.TestRef = [Test Instance ID To Be DELETED];
When I run this I get
"Could not delete from specified tables."
Is there any way of combining a Delete from the two tables into one query ?
G LS
spsinkNOJUNK@yahoo.co.uk
Remove the NOJUNK to use.