March 9, 2009 at 12:41 am
hi, i am new to sql server, .............
i have 2 databases,i have to insert data from the old database to new database........
for example i have first_name column in new database but i have first_name,first_name1,first_name2 ... 3 columns in old database...... i have to insert 3 columns into the 1 column in new database.......
i have done like this .......
1. In the dataflow task i have taken oledb source in which i have selected 3 columns and sorted it...
2.on the side taken another oledb1 source which have 1 column first_name and sorted.....
what should i do to insert 3 colums in to the one column.........
please help me urgently...........
March 9, 2009 at 1:09 am
You can make the concatenation in the oledb source by using the sql command as the data access mode. Do a SELECT and return the a derived column by concatenating the 3 columns into one. i.e.
SELECT first_name + first_name1 + first_name2 as fullname FROM SomeSource
Then use this column as the new source of your target first name column.
Other option is that you do the concatenation in data flow task by using derived column component. This method will be slower than the first one, so I don't recommend you to do this.
--Ramesh
March 9, 2009 at 1:50 am
hi........ thanks for the reply i have done this by using derived column....but i am unable to merge them and sent to the oledb destination......
i am taking oledb source from database 1 where i am taking three columns and after that derived column and adding the three columns and sort them......
created another oledb source for database 2 and taking 1 column from it and sort it ..........
and i am trying to merge them and sent to the database 2.......
but i am getting error that i cannot merge them,,,,,,,,,,
and i tried using sql query also but i am unable to merge them........
please help me........
March 9, 2009 at 9:39 am
angel41_23 (3/9/2009)
but i am getting error that i cannot merge them,,,,,,,,,,
What error you are getting exactly? Can you show that error?
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply