xmozart.ryan (12/19/2012)
Bhuvnesh (12/18/2012)
xmozart.ryan (12/18/2012)
DECLARE @query varchar(255)
SET @query = (select t_sql from t_test)
select * from (@query)
but i got err. msg "Must declare the variable '@query'"
What yiu actually need here the query as result or data of query ?
i need the data of query..
this will work
DECLARE @query varchar(255)
SET @query = ''
SET @query = 'select t_sql from t_test'
EXEC (@query)
-------Bhuvnesh----------
I work only to learn Sql Server...though my company pays me for getting their stuff done;-)