Home > Archive > MS SQL Server DTS > May 2005 > 1 data field contains new line characters. How do I ignore on exp









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author 1 data field contains new line characters. How do I ignore on exp
dataGirl

2005-05-25, 1:23 pm

Please help:

I am trying to create a piple delimited text file through a DTS export which
consists of about 93 different fields. However, there is one data field that
is populated from a list of options. The user is allowed to choose one,
click an add button, choose another, click add, etc. Everytime the user
clicks the add button, the software automatically goes to a new line and the
data is displayed in a list. When I export the data in this field to a text
file, it shows up as it does in the program:

data|data|data|optio
n1
option 2
option 3
|data|data|....

How do I ignore the new line characters (that are most likely coded in the
software), and get the data to display as follows:

data|data|data|optio
n 1 option 2 option 3|data|data...

Please advise.

Thanks
Helge C. Rutz

2005-05-25, 8:24 pm

Hi dataGirl,

funny name ;-)

"dataGirl" wrote:
> Please help:
> I am trying to create a piple delimited text file through a DTS export
> which consists of about 93 different fields. However, there is one
> data field that is populated from a list of options. The user is
> allowed to choose one, click an add button, choose another, click add,
> etc. Everytime the user clicks the add button, the software
> automatically goes to a new line and the data is displayed in a list.
> When I export the data in this field to a text file, it shows up as it
> does in the program: data|data|data|optio
n1
> option 2
> option 3
> |data|data|....
> How do I ignore the new line characters (that are most likely coded in
> the software), and get the data to display as follows:
> data|data|data|optio
n 1 option 2 option 3|data|data...


what to do depends on what you want with the result.
If you just want to import the data elsewhere, you can simply change the
row delemiter tho something else like ';'
If you want the list result in one line, then you have to replace the
newline character during export/transform.

e.g. I have done this one time before by defining a source query for the
transformation with a
REPLACE(listcolumn, CHAR(13)+CHAR(10),';
')

You have to test if your application inserts 13/10 or only 10 like many
webapps do.
If you need something more advanced, then you can transform that column
with an ActiveX Script, where you can manipulate the string in many ways.

HTH
Helge

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com