sql sever 2000 两个相同字段只显示一次(其他字段照常显示)
想要实现的结果
SQL2000没有rownumber 如何实现,在线等
[解决办法]
SELECT CASE when row=1 THEN FDate ELSE '' END FDate2,
CASE when row=1 THEN FBillNo ELSE '' END FBillNo2,
FItemid,fcuunitID,FQty,FauxPrice,FAmount
FROM
(
SELECT *,(SELECT COUNT(*) FROM vwICBill_1 WHERE FBillNo=a.FBillNo AND FItemid<=a.FItemid) row
FROM vwICBill_1 a
)M
ORDER BY FDate,FBillNo,FItemid