T-SQL: Using result of a dynamic SQL query in a variable or table(smehrozalam.wordpress.com)
submitted by
mehroz(185) 2 years, 7 months ago
Although, not a recommended practice, but sometimes we have to write our queries using dynamic SQL. In such situations, it is generally needed to fetch the result (scalar or tabular) of dynamic SQL into the main (non-dynamic) query. This is not straight forward because dynamic SQL runs in its own scope and we cannot access the variables defined in main query. This post presents a few approaches to consume the result of a dynamic SQL query ...
|category: Database
|Views: 8
tags:
Database another
Everyones tags:
Your Tags: