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 |
|
erajendar
Starting Member
4 Posts |
Posted - 2004-01-19 : 07:55:15
|
| Dear ALL,Greetings!!!If I execute the following statement:set quoted_identifier offdeclare @str varchar(500)declare @path varchar(40)set @path= "'\\rajendar\c\raj.txt'"set @str="BULK INSERT #temp FROM " + @path + " WITH(DATAFILETYPE = 'char',FIELDTERMINATOR = '\t',ROWTERMINATOR = '\n')"exec @strFollowing error is coming:Server: Msg 2812, Level 16, State 62, Line 7Could not find stored procedure 'BULK INSERT #temp FROM '\\rajendar\c\raj.txt' WITH(DATAFILETYPE = 'char',FIELDTERMINATOR = '\t',ROWTERMINATOR = '\n')'.any guess....Rajendar |
|
|
raymondpeacock
Constraint Violating Yak Guru
367 Posts |
Posted - 2004-01-19 : 07:57:19
|
| You need brackets around the @str when you 'exec' it. i.e.exec (@str)Raymond |
 |
|
|
erajendar
Starting Member
4 Posts |
Posted - 2004-01-19 : 09:37:31
|
| Thanks alot raymondpeacock!!It worked |
 |
|
|
|
|
|