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.
Author |
Topic |
shanmugaraj
Posting Yak Master
219 Posts |
Posted - 2013-05-06 : 09:31:05
|
declare @str_folder_path varchar(1000)='\\Dataupload' ,@str_media_data_file_path_csv varchar(200)='Data File.csv'BULK INSERT vw_pkg_dataload -- FROM '\\Dataupload\Data File.csv' FROM '''' + @str_folder_path + '\' + @str_media_data_file_path_csv +'''' WITH ( FIRSTROW = 2, FIELDTERMINATOR ='|',ROWTERMINATOR = '\n' ) THANKSSHANMUGARAJnshanmugaraj@gmail.com |
|
MIK_2008
Master Smack Fu Yak Hacker
1054 Posts |
Posted - 2013-05-06 : 09:47:10
|
I think you should use dynamic SQL .. wrap up the command into a string parameter and then use Exec (@variable)CheersMIK |
|
|
shanmugaraj
Posting Yak Master
219 Posts |
Posted - 2013-05-06 : 10:14:18
|
ok thanksTHANKSSHANMUGARAJnshanmugaraj@gmail.com |
|
|
|
|
|