May 21, 2002 at 8:30 am
I want to do this, i don´t know if it is posible
declare @name_table1
select * from @name_table1
I have problems.
thanks
May 21, 2002 at 8:39 am
you will have to executed the command with EXECUTED()
declare @name_table1
select * from @name_table1
EXEC ('select * from ' + @name_table1
)
Felix
May 21, 2002 at 8:43 am
quote:
I want to do this, i don´t know if it is posibledeclare @name_table1
select * from @name_table1
I have problems.
thanks
I don´t want to use execute
May 21, 2002 at 9:26 am
May 21, 2002 at 9:27 am
Andy is right. SQL (at least at this point) does not accept variables for DB, Table or Column name replacement. You will have to use EXEC.
"Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)
Edited by - antares686 on 05/21/2002 09:27:45 AM
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply