Hi Experts,
I have a situation where I need to compare values in a specific column of a specific table to all the other tables which has the same column. This is a FSM database and I need to query the orphan data (Child values which doesn't have parent values) sometimes generated when upgrade scripts are run.
As an example, imagine there is a table called "A" and in that table there is a column called "B".
There are numerous other tables which has this same column "B". So table A's "B" column is the parent and all other "B" columns are child columns. So other tables' "B" column can't have values which are not in table "A"s "B" column. I need a query to do following things,
1. To know which other tables have this column "B"
2. To know which of these columns have invalid values and to show what those invalid values are
Can someone suggest a query to do that ?
Best Regards,
Atheeq