• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 421
  • Last Modified:

MSSQLServer Bulk Insert

For the SQL Buk insert function. Is there a key work to let SQL know that the input data is qualified by double quotes (" ") marks. For example the key work FIELDTERMINATOR tells SQL that each field is terminated by a comma (,) as in the code below.

BULK INSERT [SID].[dbo].[Table]
FROM '\\tsclient\Y\TRANSFER\STU_DataWH\SQLTestData.csv'
WITH (FIELDTERMINATOR = ','  ,ROWTERMINATOR = '\n')
                                             
                                             |
0
Rpowell460
Asked:
Rpowell460
2 Solutions
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
you will need to use a format file (WITH FORMATFILE) to specify the individual field terminators.
0
 
satya_skjCommented:
Format file is thebest option as suggsted, also refer to http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=8&messageid=165368 on relevant information.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now