Thirunavukkarsu j

Thirunavukkarsu j

  • NA
  • 196
  • 88.1k

sql query Negative values assign 0 in case using

Sep 3 2015 3:41 AM
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)