これは私のスクリプトです
SELECT a.iPriority_num AS [TransNUM],b.sItem_nm as [Item],a.mSellingPrice_amt AS [aMT],
SUM(c.mCash_amt) AS [CASH]
,SUM(c.mCCard_amt) AS [CC]
,SUM(c.mEPS_amt) AS [CEPS]
,SUM(c.mGCheque_amt) AS [GC]
,SUM(c.mCheque_amt) AS [OTHERS]
FROM Table1 a
LEFT JOIN Table2 b
ON a.sPlu_cd=b.sPlu_cd
LEFT JOIN Table3 c
ON a.iPriority_num=c.iPriority_num AND
a.iBranch_num=c.iBranch_num
AND b.iCompany_typ=c.iCompany_typ
WHERE a.IAPPLY_DT BETWEEN 20130701 AND 20130731
AND a.iBranch_num=14
AND a.iStatus_typ=1
AND a.sSellUnit_CD='PC'
AND a.IPRIORITY_NUM=118271
GROUP BY
a.iPriority_num,b.sItem_nm,a.mSellingPrice_amt
結果は
TransNUM Item Price Cash CC EPS GC others
118271 Item1 204.0000 392.0000 .0000 .0000 .0000 .0000
118271 Item2 188.0000 392.0000 .0000 .0000 .0000 .0000
2行目(392)の値を0のみにしたいです。ここではSQL 2000を使用しています。