2
Answers

sql query Negative values assign 0 in case using

Hi 
My sql query  is below
 
SELECT (SUM(CAST(TOTAL_TRIPS_SLUM AS BIGINT)) - SUM(CAST(SLUM_SUPPLY AS BIGINT))) as Balance  FROM TBL_SMS_REPORT
WHERE date= '2015-09-01' 
 
Out put is :
-9
 
 i need negative values 0 assign how  this write the commant. 
Answers (2)