Hello everyone,
I am not sure how to compare the result of a dynamic sql stmt in t-sql. Sorry if it is a dummy question.
For example:
declare
@v_test varchar(10),
@v_table varchar(20)
set @v_table = 'emp'
-- this works
exec ('select top 1 description from ' + @v_table)
-- but what I need...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.