null to 0
-
hi, i am using MSSQL2000. i wrote a query with sum() of aggregate function. like Select sum(sal)from table1 where empid=1 and date>'1/23/2006' in this if thers is no record it rteurn 'NULL' is it possible to return it as 0
All I ever wanted is what others have....
CrazySanker -
hi, i am using MSSQL2000. i wrote a query with sum() of aggregate function. like Select sum(sal)from table1 where empid=1 and date>'1/23/2006' in this if thers is no record it rteurn 'NULL' is it possible to return it as 0
All I ever wanted is what others have....
CrazySanker -
hi, i am using MSSQL2000. i wrote a query with sum() of aggregate function. like Select sum(sal)from table1 where empid=1 and date>'1/23/2006' in this if thers is no record it rteurn 'NULL' is it possible to return it as 0
All I ever wanted is what others have....
CrazySanker -
of cause, the code like this: Select case when sum(sal) is null then 0 esle sum(sal) end from table1 where empid=1 and date>'1/23/2006' :laugh: