|
select sum (DocCount) as DocCount,
MAX (convert (int, SignSendDate)) as CompleteDate from ArchiveInfos
where docID in (select DocID from DocArchiveItems where InfoID = '00000000000000000019') and sourcetype = '1'
How to make doccount = 0 when docCount is null, and equal to the sum when it is not null |
|