April 17, 2003 at 3:55 am
Hi all,
I am trying to upload a binary flat file into a sql server database without much success. The file contains multiple rows (16 bytes per row... in Binary Coded Decimal) to be imported into a 7 column table. The first column has 10 bytes and 1 byte each for the remaining 6 columns. There are no field separators or row terminators. All columns in the table are varchar fields.
I am running SQL server 2000 (SP2) on a Windows 2000 platform.
Thanks in advance for your help.
April 17, 2003 at 5:32 am
I tried the following option and it seems to work.
1. Defined the text file content (test.txt)
0123456789ABCDE0
total length 16 bytes.
2. Created a odbc dsn pointing to the directory where the text file exists.
2. Selected Define format in ODBC for the text file. Selected option as FixedWidth for delimiter, Defined explicitly each column as character fields with specific widths
ColName Type Width
F1 Char 10
F2 Char 1
...
F7 Char 1
3. Used this DSN to import data using Enterprize manager Import wizard.
It imported correctly all the data.
Can you do the same and see whether it works.
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply