case when ItemCode is null then '-'
case when sum(RecdQty) is null then '-'
from ItemMaster where ItemCode='V001' group by ItemCode
If query is not getting any records for above mentioned condition, then I want zero to be displayed if datatype is int (i.e. for sum(RecdQty) field) and '-' to be diplayed if datatype is varchar (i.e. for ItemCode field).
In this situation, "ItemCode is null" and "sum(RecdQty) is null" conditions are not been utilised. Is this a limitation of case or group by clause?
No, this is not a limitation of SQL at all, it is doing exactly what it is supposed to do. Please see my explanation from the last time you asked this question by clicking here. If that explanation isn't clear or sufficient, please continue the discussion in that thread instead of starting new threads.