I have 4 tables, each has the exact same PK and FK
If I do join to all of these tables I will get one huge table.
Now that I need to delete some records (from my CF application), for example from table 1, consequently I also need to delete from 3 others table otherwise I wil create some ghost records.
Unfortunately I wasn't able to do this, I need syntax help.
I wrote the following and got an error:
My script:
Delete
from table1,table2,table3,table4
Where table1.Id = table2.Id
AND table1.Id = table3.Id
AND table1.Id = table4.Id
AND status = 'D'
error:
Server Message: Number 102, Severity 15
Server 'VCB', Line 2:
Incorrect syntax near ','.
I'm using Sybase and Coldfusion 8
If I do join to all of these tables I will get one huge table.
Now that I need to delete some records (from my CF application), for example from table 1, consequently I also need to delete from 3 others table otherwise I wil create some ghost records.
Unfortunately I wasn't able to do this, I need syntax help.
I wrote the following and got an error:
My script:
Delete
from table1,table2,table3,table4
Where table1.Id = table2.Id
AND table1.Id = table3.Id
AND table1.Id = table4.Id
AND status = 'D'
error:
Server Message: Number 102, Severity 15
Server 'VCB', Line 2:
Incorrect syntax near ','.
I'm using Sybase and Coldfusion 8