problem with bcp format file
From: Tom L (tlanger_n05p4m_dls.net)
Date: 05/14/04
- Previous message: Bill Ray: "indexes not showing up in script or query analyzer"
- Next in thread: WangKhar: "Re: problem with bcp format file"
- Reply: WangKhar: "Re: problem with bcp format file"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 14 May 2004 17:29:58 -0500
My format file is:
7.0
11
1 SQLCHAR 0 20 "|" 1 datCreated SQL_Latin1_General_Cp437_BIN
2 SQLCHAR 0 80 "|" 2 txtEmail SQL_Latin1_General_Cp437_BIN
3 SQLCHAR 0 50 "|" 3 txtName SQL_Latin1_General_Cp437_BIN
4 SQLCHAR 0 50 "|" 4 txtAddress SQL_Latin1_General_Cp437_BIN
5 SQLCHAR 0 50 "|" 5 txtAddress2 SQL_Latin1_General_Cp437_BIN
6 SQLCHAR 0 50 "|" 6 txtCity SQL_Latin1_General_Cp437_BIN
7 SQLCHAR 0 50 "|" 7 txtState SQL_Latin1_General_Cp437_BIN
8 SQLCHAR 0 10 "|" 8 txtZip SQL_Latin1_General_Cp437_BIN
9 SQLCHAR 0 2 "|" 9 txtCountry SQL_Latin1_General_Cp437_BIN
10 SQLCHAR 0 20 "|" 10 txtPhone SQL_Latin1_General_Cp437_BIN
11 SQLCHAR 0 15 "\r\n" 11 txtIP SQL_Latin1_General_Cp437_BIN
sample data file: (enter after the ip address to indicate end of record..
pipe used to indicate field.)
5/14/2004
3:01:22PM|asdf@asdf.com|Thomas+Laer|123+asdf+Drive|Suite+%23102|Lake+in+the+
Hills|IL|20123|US|60343123312|20.0.5.146
5/14/2004
3:16:16PM|mrasdm@kjjndg.com|Thomas+Langer|123+Appleton|Suite+%23412|lake+in+
the+Hills|IL|12346|us|5123123123|21.0.5.46
5/14/2004
3:26:32PM|masdf@sasdfasdy.com|Thomasasdf|123+afsd+DRIVE|Suite+123|Lake+in+th
e+HIILLS|Il|10606|US|1231231231|6.80.5.6
In query analyzer, I run:
BULK INSERT tmpMembers FROM 'c:\2004051415.txt' WITH (FORMATFILE =
'c:\ee2\memberdata.fmt')
And it says:
Server: Msg 4823, Level 16, State 1, Line 1
Could not bulk insert. Invalid column number in format file
'c:\ee2\memberdata.fmt'.
And I say:
Please help.. This SIMPLE problem is confusing the hell out of me, as I've
use format files a handful of other times w/o problem. The table tmpMembers
is the same table structure as it shows in the fmt file, same order and
everything. The version should be good, as this is on a SQL 7 box. On SQL
2k, using version 8.0, and with 9 fields in it, this worked fine - but I
added 2 fields, and moved it on a sql7 box, and here I am <scratching head>
Thanks!
- Previous message: Bill Ray: "indexes not showing up in script or query analyzer"
- Next in thread: WangKhar: "Re: problem with bcp format file"
- Reply: WangKhar: "Re: problem with bcp format file"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|