Hi Hack,
Ok i can do it like what you have suggested. but... suppose if i don't know which tableNames are reciding in the "metatable", then how can i do it? Actually it is a re-usable query in my Stored procedure. so it should be generic.

Quote Originally Posted by Hack
Just run the query three times, once for each table.