[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 419
  • 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

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

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