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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Pipe vs coma

Author  Topic 

JoshBrigade
Starting Member

28 Posts

Posted - 2009-10-29 : 07:55:00
HI,
I'm have working code to read from a file with a , as the field terminator, but would rather have the file with | (pipes). I replaced the , with | but SQL doesn't like that. Does anyone know how to properly syntax this?

BULK INSERT Testimportb
FROM 'C:\Sirsi.txt'
WITH ( FIELDTERMINATOR ='|'| FIRSTROW = 2 )

####result#####Incorrect syntax near '|'.

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2009-10-29 : 08:08:38
WITH ( FIELDTERMINATOR ='|', FIRSTROW = 2 )


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page
   

- Advertisement -