Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using table name as a variable

Status
Not open for further replies.

Avacha

Technical User
Apr 1, 2002
69
US
I need to create Stored Procedure using Table Name
and Field Name as variables
If same one knows, please, help me with syntax.
I would greatly appreciate your help.
 
Check out this FAQ on dynamic SQL statements: faq183-3132

--Angel [rainbow]
-----------------------------------
Every time I lose my mind, I wonder
if it's really worth finding.
 
AngelWPBTampa :

Great info but I need to pass the file name into a bulk insert statement. When I tried to exec the VARIABLE it appears to have tried to parse the string into a sql stmt.

Can you point me in the right direction?
 
Can you post the code to the stored procedure and sample parameter values? It makes it much easier to debug. [smile]

--Angel [rainbow]
-----------------------------------
Every time I lose my mind, I wonder
if it's really worth finding.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top