I am getting error messages when I try to delete from a table using
the values in the table itself. The intent is to delete all rows from
TableA where col_2 matches any of the col_1 values.
DELETE FROM TableA FROM TableA x INNER JOIN TableA y ON (x.col_1 =
y.col_2)
Error msg: The table 'TableA' is ambiguous.
Can this be done with SQL or should I use T-SQL with cursors here?
the values in the table itself. The intent is to delete all rows from
TableA where col_2 matches any of the col_1 values.
DELETE FROM TableA FROM TableA x INNER JOIN TableA y ON (x.col_1 =
y.col_2)
Error msg: The table 'TableA' is ambiguous.
Can this be done with SQL or should I use T-SQL with cursors here?
Comment