all groups > sql server dts > october 2004 >
You're in the

sql server dts

group:

Format File Error??


Format File Error?? Steve
10/29/2004 1:48:01 PM
sql server dts:

Hi,
I have to import a data file into my table. My table has 4 columns & the
datafile has 3 columns. I am using the following format file with fixed
length.



7.0
3
1 SQLCHAR 0 5 "" 1 order_number
2 SQLCHAR 0 7 "" 2 item_number
3 SQLCHAR 0 15 "" 3 type
4 SQLCHAR 0 0 "\r\n" 0 info_id


As the datafile has 3 colums therefore I am using zero length for my last
column in the format file. But I get error when I try to import the data.

Table:
CREATE TABLE [orders] (
[order_number] [int] NOT NULL ,
[item_number] [int] NOT NULL ,
[type] [varchar] (15) NOT NULL ,
[info_id] [int] NULL
) ON [PRIMARY]
GO


Plz.help


Steve

RE: Format File Error?? Ed
10/29/2004 2:25:04 PM
Could you please be more details about how you import the data and what kind
of error message you get.

Ed

[quoted text, click to view]
RE: Format File Error?? Steve
10/29/2004 2:48:03 PM
Thanks Ed for looking into it. I got it corrected by using 3 columns.

7.0
3
1 SQLCHAR 0 5 "" 1 order_number
2 SQLCHAR 0 7 "" 2 item_number
3 SQLCHAR 0 15 "\r\n" 3 type

For test purposes I am currently using Bulk Insert task in Query analyzer
to import the data.

Steve

[quoted text, click to view]
AddThis Social Bookmark Button