我有一個查詢的訪問就是這種擺脫零:得到在訪問查詢的輸出
SELECT iif([Cup Type] like '*Cylinder*',count([Cup Type]),0) AS Cylinder,
iif([Cup Type] like '*Snap*',count([Cup Type]),0) AS Snap,
iif([Cup Type] like '*Tip*',count([Cup Type]),0) AS Tip,
iif([Cup Type] like '*Other*',count([Cup Type]),0) AS Other
FROM [Lab Occurrence Form]
WHERE [1 0 Preanalytical (Before Testing)] Like '*1.3 QNS-Quantity Not Sufficient*'
And ((([Lab Occurrence Form].[Occurrence Date])
Between Forms!Meeting_Reasons_Frequency!Text4
And Forms!Meeting_Reasons_Frequency!Text2))
GROUP BY [Cup Type];
輸出看起來是這樣的:
Cylinder Snap Tip Other
0 0 0 0
71 0 0 0
0 0 0 18
0 7 0 0
0 0 4 0
我的可怕格式道歉,但我如何擺脫零?
,我應該這樣做select cylinder, snap, tip, other, from query1 where cylinder <> 0 etc..???
我所要的輸出是:
Cylinder Snap Tip Other
71 7 4 18
你的意思是「擺脫零」?你能顯示你想要的輸出嗎? – 2010-06-30 23:06:52
是的,我剛剛編輯它,感謝您的幫助 – 2010-06-30 23:07:12