DTS Fixed Width File Import
Hi,
I am really new to DTS so please excuse if you find my query to simple.
I have a text file which has lots of records which I am trying to import into a SQL table using a DTS package.
The format of the text file is like this
Field1 ,Field2 ,Field3 ,Field4
Field1 ,Field2 ,Field3 ,Field4
Field1 ,Field2 ,Field3 ,Field4
Field1 ,Field2 ,Field3 ,Field4
As you can see, the text is properly organized but I am facing the following problem
1) [u]If I try to import it as a comma delimited file</u>
Some of the fields inside the text have comma within them. For example field1 in row 1 is like AA,BB,CC and field1 in row 2 is like FFFF. This causes a problem as DTS puts AA and FFFF in one column and BB and Field2 in the next column and so on. Effectively thus, the no. of columns keep increasing and I end up getting an error
"non-white spaces have been found at the end of last column"
2) [u]If I try to import it is a fixed width file </u>
It does extract properly but also places the comma along with the fields in the table. How do I get rid of them?
I will appreciate if someone can give me a solution fix for both the above methods or atleast one of the above.
Thanks a lot
|