November 13, 2012 at 9:40 am
Hello
Please help me to do this
CREATE TABLE #X1
(vcEmployeeUniqueID VARCHAR(20),
vcLastName VARCHAR(20),
vcFirstName VARCHAR(20),
vcSchoolName VARCHAR(50),
iSchoolYearCode INT)
INSERT INTO #X1 VALUES ('001210214','Miller','Helen','NORWALK HIGH SCHOOL',2009)
INSERT INTO #X1 VALUES ('001210214','Miller','Helen','STAMFORD HIGH SCHOOL',2010)
INSERT INTO #X1 VALUES ('001210214','Miller','Helen','NORWALK HIGH SCHOOL',2011)
INSERT INTO #X1 VALUES ('003215847','Carolyn','June','NORWALK HIGH SCHOOL',2010)
INSERT INTO #X1 VALUES ('003215847','Carolyn','June','WATERBURY HIGH SCHOOL',2011)
INSERT INTO #X1 VALUES ('002149013','Steve','Ulman','STAMFORD HIGH SCHOOL',2011)
Desired output will be
vcEmployeeUniqueIDvcLastNamevcFirstNameSY2009SY2010SY2011
001210214MillerHelenNORWALK HIGH SCHOOLSTAMFORD HIGH SCHOOLNORWALK HIGH SCHOOL
003215847CarolynJuneNORWALK HIGH SCHOOLWATERBURY HIGH SCHOOL
002149013SteveUlmanSTAMFORD HIGH SCHOOL
November 13, 2012 at 10:08 am
No need in duplicating your posts!
http://www.sqlservercentral.com/Forums/Topic1384158-392-1.aspx
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply