SQL - Set "default" value?
Posted on 2004-11-08
I've got the following simple query
SELECT TABLEX.BuySell AS TradeType, Count(TABLEX.BuySell) AS [CountNum], Sum(TABLEX.Amount) AS [Sum]
GROUP BY TABLEX.BuySell;
that returns the number of and the sum of "Buys" and "Sells" (TradeType column). If either (or both) "buy" or "sell" is equal to zero, the query returns a blank table.... so i was wondering if it's possible to set a "default" record with both "CountNum" and "Sum" equal to zero?