Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 SQL parameters

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2006-07-11 : 11:16:14
Tiks writes "how to pass parameters as table name in SQL commands
sorry i am new to sql

yr = "2006"
tabel1 = "sales"
Table_Name = table1+yr

strSQL = "SELECT * FROM Table_Name WHERE "{Table_Name.sale_date} = " & "'" & txtSale_Date & "'""

graz
Chief SQLTeam Crack Dealer

4149 Posts

Posted - 2006-07-11 : 11:16:14
Please read the FAQ for dynamic SQL.
Go to Top of Page
   

- Advertisement -