Is this in DTS or in general.
As you have included the .Programming group I shall assume the latter.
There is an excellent paper here that will tell you everything you need to
know.
http://www.sommarskog.se/dynamic_sql.html
--
----------------------------
Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org
" PK" <pk999 (AT) hotmail (DOT) com> wrote
Quote:
Declare a variable XXX
a table name = TableXXXName ( insert variable between Table and Name)
how to write a select statement where table name got insert a variable ?
Select * from Table+XXX+Name .......can not
Select * from Table%XXX%Name......can not
Select * from Table&XXX&Name .......can not
Select * from Table||XXX||Name......can not
pls advise me...thank you |