hello guys, can we get recordset from the query that we saved in the recordset ??
CREATE TABLE [dbo].[t_test] (
[t_sql] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[name] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
) ON [PRIMARY]
insert into t_tes (t_sql,name) values ('select * from view1','select recordset from view1)
and then i want to call recordset from the query that i saved in t_test with this code :
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'"