Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 Bulk Insert with variable number of columns...

Author  Topic 

Honu
Starting Member

1 Post

Posted - 2007-02-14 : 04:10:38
Hi everybody,

My csv file contain for example 6 columns, tabulation separated, cariage return as end of line... Some rows only contain 3 columns, the 3 last not there .. example

22 Tab 234 Tab 234 Tab 234 Tab 342 Tab 232 CR
32 Tab 234 Tab 234 Tab 234 Tab 342 Tab 232 CR
23 Tab 234 Tab 234 CR
22 Tab 234 Tab 234 Tab 234 Tab 342 Tab 232 CR
.
.
In one word, three Tab are missing...

Is there a way to properly integrate this file ..?
The problem i have got at the moment is that it does not detect the CR as an end and do not begin the newline as a new row ... In my table, i've got something like

32 234 234 234 342 232
23 234 234 22^t234^t234^t234^t342

Instead of
32 234 234 234 342 232
23 234 234
22 234 234 234 342 232

Did someone experience the same problem ..?

Something more, importing with DTS method is working fine since there is an option for "missing" columns...

Thanks for your help,

   

- Advertisement -