can any body help me to populate table variable using dynamic query a i posted above. i had hard time to resolve this .
the above dynamic sql get tablename based on type id THEN we need to fetch some data from select query and populate table variable @tblAmount
-------Bhuvnesh----------
I work only to learn Sql Server...though my company pays me for getting their stuff done;-)