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
 General SQL Server Forums
 New to SQL Server Programming
 DTS: Cannot pass row delimiter by global variable

Author  Topic 

kunyang
Starting Member

2 Posts

Posted - 2009-09-23 : 12:03:12
Hi, Experts,

I am trying to import data from different text source file by using a generic DTS. I have a config table to keep features of these text files. For example, the row delimiter of each file. Then, I query this table and get the row delimiter to a global variable. Then assign the value of this global variable to the row delimiter of the connection. Here is the data flow: config table --> global variable --> connection. When I run the DTS, the row demiliter "{LF}" is shown in the connection, but the task failed with error:
"Too many columns found in the current row; non-whitespace characters
were found after the last defined column's data."
My understanding is that the row delimiter passed by global variable is not recognized by the connection.

But it works well if I type "{LF}" into the connection or select it from the row delimiter list in the connection.

Do not know why.

Thank you very much in advance for your help.

Kunyang

X002548
Not Just a Number

15586 Posts

Posted - 2009-09-23 : 12:54:02
And you're doing this in DTS?

Why not use a Sproc, bcp and xp_cmdshell

??

Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2009-09-23 : 13:11:42
Please do not cross post:

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=133295
Go to Top of Page
   

- Advertisement -