daveriya (2/28/2011)
Can we discuss what are the way,we can check that the consolidated tables were generated correctly?
How much do you need to check?
1. Check a table exists with the correct name
2. Check a table exists with the correct name AND has the correct column names, types...
There are a couple of ways to check for a table with a particular name: look in the system view sys.tables, or check if the OBJECT_ID function returns a non-NULL value when given the name as a parameter.
If you need to check more than one table, you will need a loop or join to a table of numbers.
Paul