dbTalk Databases Forums  

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

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss 1 data field contains new line characters. How do I ignore on exp in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
dataGirl
 
Posts: n/a

Default 1 data field contains new line characters. How do I ignore on exp - 05-25-2005 , 12:54 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|option1
option 2
option 3
Quote:
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|option 1 option 2 option 3|data|data...

Please advise.

Thanks


Reply With Quote
  #2  
Old   
Helge C. Rutz
 
Posts: n/a

Default Re: 1 data field contains new line characters. How do I ignore on exp - 05-25-2005 , 01:50 PM






Hi dataGirl,

funny name ;-)

"dataGirl" wrote:
Quote:
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|option1
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|option 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



Reply With Quote
  #3  
Old   
dataGirl
 
Posts: n/a

Default Re: 1 data field contains new line characters. How do I ignore on - 05-25-2005 , 03:12 PM



AWESOME!! Thank you so much.

"Helge C. Rutz" wrote:

Quote:
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|option1
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|option 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



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.