1
select
COUNT(Table1.ID) as count_shipped,
null as count_shipped
from Table1
where
table1.saleStatus='shipped'
and table1.saleApproved='yes'
union
select
null,
COUNT(Table1.ID) as count_pending
from Table1
where
table1.saleStatus in ('Pending', 'awaiting payment', 'backorder')
合併行。這給出了這樣的輸出用NULL列
count_shipped count_shipped
NULL 5
4 NULL
,但我不想空我只希望在一個4行5任何人可以幫助我如何做到這一點的SQL Server?
太感謝你了,先生 – user3370649