Re: bcp problem
From: JD (joeydba_at_yahoo.com)
Date: 12/14/04
- Previous message: JD: "Re: BCP connection problem"
- In reply to: Hans: "bcp problem"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 14 Dec 2004 14:47:19 -0600
Have you looked at using a format file for your BCP command? BOL will
explain how to use them.
"Hans" <Hans@discussions.microsoft.com> wrote in message
news:F46030CF-34BD-45F9-BF49-9E8868A3207F@microsoft.com...
> I am trying to import data from a file. The file has entries like
>
> 1437 "PJ_001" 3 "PJ/001 "
> 5746 "PJ_002" 3 "PJ/002 "
>
> while the table is defined as
>
> k int 4 nulls
> f text 16 nulls
> c int 4 nulls
> p char 30 nulls
>
> When I use command
>
> bcp "MyDatabase.dbo.MyTable" in "D:\Development\MyDatabase\MyFile.txt" -c
> -S"MyPc\MyInstance" -U"sa" -P"MyPass"
>
> I get error message
>
> SQLState = 22001, NativeError = 0
> Error = [Microsoft][ODBC SQL Server Driver]String data, right truncation
>
> on every entry. Can anybody explain why, or even better, how to get this
> working???
>
> Thanks in advance!
> Hans.
- Previous message: JD: "Re: BCP connection problem"
- In reply to: Hans: "bcp problem"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|