Solved

how to BCP upload a simple CSV file without a format file

Posted on 2007-11-21
5
666 Views
Last Modified: 2010-05-18
I answered this question while typing it, so it's just here for the record!


bcp %DBNAME%.dbo.parm_Global in parm_Global.txt -S %SERVERNAME% -T -t, -c


But any tips on handling strings in quotation marks? so that string can contain commas?

Thanks





0
Comment
Question by:xenium
  • 3
  • 2
5 Comments
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 20332758
you will need format file to configure the places where you have a "column delimiter" of quotes or the like.
the problem is the same as for the commas, though, as you might have some data with quotation marks also...
0
 

Author Comment

by:xenium
ID: 20333844
Ok thanks for the info.
0
 
LVL 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 50 total points
ID: 20333849
0
 

Author Comment

by:xenium
ID: 20333857
Is there any way to import csv without format file? I guess a straight copy and then an sp applied to the load would do it.

Any further info is extra points.
0
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 20333867
as you have extra "," and quotes around, no way around the format file, sorry
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

Nowadays, some of developer are too much worried about data. Who is using data, who is updating it etc. etc. Because, data is more costlier in term of money and information. So security of data is focusing concern in days. Lets' understand the Au…
When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Viewers will learn how the fundamental information of how to create a table.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now