dbTalk Databases Forums  

Merge information from 2 columns into 1 column

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


Discuss Merge information from 2 columns into 1 column in the microsoft.public.sqlserver.dts forum.



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

Default Merge information from 2 columns into 1 column - 01-06-2006 , 03:41 PM






I have a database that has a column for the first name and a column for a
last name. I need to use a dts report to merge these two fields into an
additional column in the database. I need to keep all three columns.

Any suggestions?

Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Merge information from 2 columns into 1 column - 01-07-2006 , 05:39 AM






Hello smrshl,

Use an Active Script transform and have two columns from the source columns
and one from the destination columns. Your Active Script transform will
look simlar to

DTSDestination("Dest Col Name") = DTSSource("SourceColumn 1") + DTSSource("SourceColumn
2")


Make sense?


You could also try doing this in a SourceSQLStatement when defining the datapump
and this would be more efficient. so instead of specifying a table from the
source you do something like

SELECT ................ Col1 + Col2 FROM TABLE

Help?

Allan



Quote:
I have a database that has a column for the first name and a column
for a last name. I need to use a dts report to merge these two fields
into an additional column in the database. I need to keep all three
columns.

Any suggestions?




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.