これはうまくいくはずです
SELECT 'atm' type, SUM(atm) Amount FROM sales
WHERE repId= 9000 AND DATEADD(dd,0,DATEDIFF(dd,0,idate)) ='2013-08-25 00:00:00'
UNION ALL
SELECT 'cc' type, SUM(cc) Amount FROM sales
WHERE repId= 9000 AND DATEADD(dd,0,DATEDIFF(dd,0,idate)) ='2013-08-25 00:00:00'
UNION ALL
SELECT 'csh' type, SUM(csh) Amount FROM sales
WHERE repId= 9000 AND DATEADD(dd,0,DATEDIFF(dd,0,idate)) ='2013-08-25 00:00:00'
UNION ALL
SELECT 'chk' type, SUM(chk) Amount FROM sales
WHERE repId= 9000 AND DATEADD(dd,0,DATEDIFF(dd,0,idate)) ='2013-08-25 00:00:00'
または、CTE を使用して:
;WITH CTE(atm,cc,csh,chk) AS
(SELECT SUM(atm),SUM(cc),SUM(csh),SUM(chk) FROM sales
WHERE repId= 9000 AND DATEADD(dd,0,DATEDIFF(dd,0,idate)) ='2013-08-25 00:00:00' )
SELECT 'atm' Type,atm Amount FROM CTE
UNION ALL SELECT 'cc' ,cc FROM CTE
UNION ALL SELECT 'csh',csh FROM CTE
UNION ALL SELECT 'chk',chk FROM CTE