Yes PIVOT is the best
CREATE TABLE #Sales (SalesDate smalldatetime,Customer int,Sales decimal(20,4))
INSERT INTO #Sales Values ('2011/11/01',1,10)
INSERT INTO #Sales Values ('2011/11/02',1,10)
INSERT INTO #Sales Values ('2011/05/02',2,25)
INSERT INTO #Sales Values ('2011/12/01',2,20)
INSERT INTO #Sales Values...