Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

BCP Uiltity Arguments

Status
Not open for further replies.

PNC

MIS
Jun 7, 2001
87
US
Hi,

I have a text file with one column:

value1;
value2;
value3;

I want to use the bcp utility to export it to a table with one column [varchar (128)], but I'm not able to define the right arguments so that it can be exported properly.

Code:
BCP DBNAME.OWNER.TABLE IN FILE.TXT /U USERNAME /P PASSWORD /S SERVERNAME


Any ideas?

Thanks.

 
Is the ';' part of the value?

If it is - you are doing fine.
You are using SQL SERVER login (/U /P).
I imagine that the user and password are correct. You can validate them in query analyzer.


"A long life is when each day is full and every hour wide!"
(A Jewish Mentor)
M. [hourglass]

 

Note the command need to quote the table name and there is no space between the flag and parameter.

BCP "DBNAME.OWNER.TABLE" IN "FILE.TXT" /Uusername /Ppassword /Sservername

 
No ";" is not part of the value, the way it is currently, I'm only able to upload 6000 rows, but the file contains 70000 rows, I need to add an argument that says the row ends after ";" and on to the next line.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top