Quantcast
Channel: Oracle, MySQL, Sybase, Informix and other databases
Viewing all articles
Browse latest Browse all 1350

Splitting data from large CSV file

$
0
0

Hi All,

I have a CSV data file which I need to extract data from and then write the parsed contents to a SQL table. I can sucessfully do this except with one column which contains a large amount of textual data. This results in the following error -Received an invalid column length from the bcp client for colid 5

The format of the CSV is as follows;

Col1,Col2,Col3,Col4,Col5,Col6
A,B,C,D
Da
Db
Dc
Dn,E,F

Dn represents that the data in Col4 can be nth large.

What I would like to do is put the data from Col4 into a separate SQL table which somehow has a reference to Col6. So if that are 1000 items parsed from Col4, they are written to a SQL table which has those 1000 items on separate entries but with a unique reference to Col6, so a query can be written to get the data back for the correct record in the primary table.

If you can see any other way of solving this problem, please better my approach.

Any help is much appreciated.

Regards, Taz.


Viewing all articles
Browse latest Browse all 1350

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>