hi guys
I am trying to create multiple rows data in single row using reverse pivot transformation but somehow it is not working..
Sample data scripts:-
CREATETABLE TEST(id INT,dt1 datetime, total int, new int, old int, status_1 varchar(50), no_ int)
INSERTINTO TEST VALUES (101,'2013-04-24 00:00:00.000',10, 7, 3,'new with tags', 2)
INSERTINTO TEST VALUES (101,'2013-04-24 00:00:00.000',10, 7, 3,'new without tags',4)
INSERTINTO TEST VALUES (102,'2013-11-07 00:00:00.000',15, 9, 6,'new with tags', 5)
INSERTINTO TEST VALUES (102,'2013-11-27 00:00:00.000',15, 9, 6,'new without tags', 2)
INSERTINTO TEST VALUES (102,'2013-11-27 00:00:00.000',15, 9, 6,'return', 1)
INSERTINTO TEST VALUES (103,'2013-12-04 00:00:00.000',25, 15, 10,'cancelled', 5)
select*from TEST
CREATETABLE TEST_RESULT(id INT,dt1 datetime, total int, new int, old int, [new with tags] varchar(50), [new without tags] varchar(50), [return] varchar(50), [cancelled] varchar(50))
INSERTINTO TEST_RESULT VALUES (101,'2013-04-24 00:00:00.000',10, 7, 3, 2,4,0,0)
INSERTINTO TEST_RESULT VALUES (102,'2013-11-07 00:00:00.000',15, 9, 6, 5,2,1,0)
INSERTINTO TEST_RESULT VALUES (101,'2013-12-04 00:00:00.000',25, 15, 10, 0,0,0,5)
select*from TEST_RESULT.
Please find attached scrrenshot of dataflow using reverse pivot transformation... Please let me know what i am doing wrong..
Regards