Hi,
I have two tables: TableA and TableB they both have a column called "OrderNo" (same type and info, of course), I would like to delete those entries in TableB that ARE NOT in TableA according to the "OrderNo".
"OrderNo" is the Primary Key in TableA, but it is allow to have duplicates in TableB of "OrderNo"
It is to say, I would have in TableB "OrderNo" values only if they exist in TableA, now I want to avoid to have "OrderNo" in TableB that does no exist in TableA.
What would SQL command to do this?
I am using OleDB in C#.
Thanks,
Enrique.
I have two tables: TableA and TableB they both have a column called "OrderNo" (same type and info, of course), I would like to delete those entries in TableB that ARE NOT in TableA according to the "OrderNo".
"OrderNo" is the Primary Key in TableA, but it is allow to have duplicates in TableB of "OrderNo"
It is to say, I would have in TableB "OrderNo" values only if they exist in TableA, now I want to avoid to have "OrderNo" in TableB that does no exist in TableA.
What would SQL command to do this?
I am using OleDB in C#.
Thanks,
Enrique.