SQLTeam.com | Weblogs | Forums

Convert data from this table to other table

sql2008

#1

I have 2 data table structure and data, as shown below:


I want to transfer data from table1 to table2 like shape. Please help me. Thank you


#2

If you take the trouble to provide consumable test data, someone may show you how to normalize the data with Jeff Moden's DelimitedSplit8K function:

http://www.sqlservercentral.com/articles/Tally+Table/72993/

and then how to roll it up again:


#3

@Ifor, I do not think they want to split the data, but append.

@haocaocu, Here is a link that might help. http://sqlperformance.com/2014/08/t-sql-queries/sql-server-grouped-concatenation


#4

Thanks for reply
My sample data in two tables and Fiber2 CongVan TB. I want to use the function or procedure to get the results as TB_User_DocCV table. Thank you!
http://4share.vn/f/34000c020505050d/Example.rar