bcp Questions

12

Solved

Trying to import data into Azure. Created a text file in Management Studio 2005. I have tried both a comma and tab delimited text file. BCP IN -c -t, -r\n -U -S -P I get the error {SQL Server Nat...
Engen asked 13/10, 2014 at 11:37

10

Solved

How can I specify an input sql file with a long query when using bcp? I tried using the -i option but it keeps complaining about a command-line error with no extra information. Is this possible?
Brut asked 13/5, 2012 at 2:54

5

Solved

Someone please help me here. Been looking at this for a couple of hours now but leading to nowhere. I created a table in SQL Express 2008 R2 using the following script: CREATE TABLE Features ( ID...
Mcmurry asked 15/12, 2011 at 1:16

4

Solved

I export data from database using the BCP utility, I want to install bcp in client machine. I don't want to install SQL Server 2008 in client machine. Is their any minimal installers available to ...
Cutch asked 14/3, 2011 at 5:22

5

Solved

I need to export some data using SQL Server 2000's BCP utility. Sometimes my data contains characters, such as \t and \n, that I need to use as column and row terminators. How do I get BCP to escap...
Eustatius asked 29/12, 2009 at 18:24

11

I have encountered an error while working with bcp: SQLState = 22001, NativeError = 0 Error = [Microsoft][SQL Server Native Client 10.0]String data, right truncation I'm trying to unpack the data...
Noticeable asked 19/7, 2012 at 17:59

5

Solved

I am pretty much new to bcp but I researched quite a bit and can not find any resource that says where we are actually sending the user name and password to the database with this command. So every...
Puparium asked 5/9, 2013 at 17:25

3

I was trying copy data from a table to another table in another database using bcp. First a format file was created using !! bcp dbName1.dbo.tableName1 format nul -S serverName1 -T -f D:\tableNam...
Climatology asked 12/9, 2018 at 12:27

19

Solved

I have seen a number of hacks to try to get the bcp utility to export column names along with the data. If all I am doing is dumping a table to a text file what is the most straightforward method t...
Paulenepauletta asked 31/8, 2009 at 5:7

3

I am getting this Error While I try to do BCP SQLState = S1000, NativeError = 0 Error = [Microsoft][SQL Server Native Client 11.0]Unable to open BCP host data-file This is my code: DECLARE...
Sleety asked 17/10, 2013 at 20:45

13

Solved

Below is an example of the BCP Statement. I'm not accustomed to using BCP so your help and candor is greatly appreciated I am using it with a format file as well. If I execute from CMD prompt it ...
Homiletics asked 4/9, 2013 at 16:21

7

Solved

I have used database import/export to move in and out data out of SQL Server with no problems. After 3 hours of searching, I have not seen the SQL server Import/Export equivalent for an Azur...
Medeiros asked 20/11, 2015 at 4:43

7

Solved

I'm trying to use the SQL Server bcp utility to import a text file from a samba share. bcp is choking on the Unix line endings. I'm sure I could add an intermediate step, either on Unix or Windows,...
Laughing asked 29/9, 2009 at 18:52

4

I've just create a new table in my sqlserver name exporttable now I'm trying to push out using cmd bcp but om getting this following error: SQLState = S1000, NativeError = 0 Error = [Microsoft]...
Supernal asked 13/9, 2016 at 8:22

6

Solved

Running this: bcp MyDb.dbo.uvwMyView out "c:\Test.txt" -SMyServer -T -c I get this error: SQLState = S1000, NativeError = 0 Error = [Microsoft][SQL Native Client]Unable to resolve column level ...
Sf asked 9/11, 2009 at 18:10

7

Solved

I have this BCP command: 'bcp DBName..vieter out c:\test003.txt -c -T /t"\",\"" -S SERVER' The output CSV I get does not put quotes around the field names, instead it puts it around the commas! ...
Greenwich asked 13/1, 2010 at 23:29

3

I'm trying to use the Boost Copy (BCP) utility to pull the normal_distribution class out of Boost. However, when I do bcp normal_distribution ./my_normal_distribution_dir, nothing appears in the my...
Jeffreys asked 22/7, 2012 at 21:57

4

Solved

I have a csv file and i need to import it to a table in sql 2005 or 2008. The column names and count in the csv are different from the table column names and count. The csv is splitted by a ';' . ...
Esoterica asked 29/5, 2009 at 7:0

2

Solved

I have to generate xml file for the format of encoding="UTF-8. I used bcp queryout. xml file was generating. But my issue was the xml file validation fail. could any one help me to resolve this? Th...
Relativistic asked 3/4, 2018 at 6:58

2

Solved

I'm using BCP to bulk upload data from a CSV file to SQL Azure (because BULK INSERT is not supported). This command runs and uploads the rows: bcp [resource].dbo.TableName in C:\data.csv -t "," -r...
Morrissey asked 6/1, 2017 at 13:56

3

Solved

This struck me as really weird behaviour and I spent a while checking for bugs in my code before I found this "out copies from the database table or view to a file. If you specify an existing file...
Policewoman asked 29/10, 2009 at 15:56

2

I use simple code declare @sql varchar(8000) select @sql = 'bcp ExcelAnalysis.dbo.ClearDB out c:\csv\comm.txt -c -t, -T -S '+ @@servername exec master..xp_cmdshell @sql but this code export a...
Verduzco asked 17/6, 2017 at 16:32

13

Solved

I want to export some SQL Server 2005 data to CSV format (comma-separated with quotes). I can think of a lot of complicated ways to do it, but I want to do it the right way. I've looked at bcp, but...
Misread asked 28/4, 2009 at 19:21

4

I have a very large csv file with ~500 columns, ~350k rows, which I am trying to import into an existing SQL Server table. I have tried BULK INSERT, I get - Query executed successfully, 0 rows aff...
Luge asked 30/11, 2011 at 15:32

2

Solved

I have a remote SQL Server with a hostname I am using to connect to. BCP suggests to use bcp DBName.dbo.tablename in C:\test\yourfile.txt -c -T -t However when I try this it does not connect t...
Gussy asked 7/3, 2017 at 18:5

© 2022 - 2025 — McMap. All rights reserved.