-
BULK INSERT using variables
I'd like to "pass" the BULK INSERT statement a variable for the table_name and file_name arguments. I've tried the following:
-----
BULK INSERT @strTableName
FROM @strDataFileName
WITH
(
FIELDTERMINATOR = " ",
ROWTERMINATOR = "
"
)
-----
where the @strTableName and @strDataFileName variables are passed in via stored procedure arguments. I get the error:
Incorrect syntax near '@str_TableName'.
Is there a way to do this?
Thanks!
Jeff
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|