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 |
|
Sirchrisak
Starting Member
19 Posts |
Posted - 2005-06-10 : 09:04:14
|
| hi , pls help me figure out what is wrong with my code,I want to pass a Variable from where i will supply the data for my BULK INSERT operation. Each time I run it SQL willcomplain an error near @CourseCode. Thaks, here is my codeCreate procedure dbo.STP_AddCODE( @CourseCode varchar(500))ASBULK INSERT [STUDENT_COURSE_Course1]FROM @CourseCodeWITH(FIELDTERMINATOR =',',ROWTERMINATOR = ';')Chris |
|
|
nellyihu
Starting Member
8 Posts |
Posted - 2005-06-10 : 09:14:56
|
| check if the name BULK INSERT is not a reserved word in T-SQLcheersnellysoft |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-06-10 : 09:18:46
|
| [code]Create procedure dbo.STP_AddCODE(@CourseCode varchar(500))ASDeclare @sql as varchar(200)Set @sql='BULK INSERT [STUDENT_COURSE_Course1]FROM '+@CourseCode+'WITH(FIELDTERMINATOR ='','',ROWTERMINATOR = '';'')'Exec(@sql)[/code]MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|