Why don't you try IF(column_name IS NULL, 0) AS column_name; After this you can perform your aggregation on top of this.
On Wed, Jun 3, 2015 at 11:16 AM, Ravisankar Mani <rrav...@gmail.com> wrote: > Hi Everyone, > > I need to check condition measure value is null or not. If it is null is > then replace 0 otherwise in returns same values > > It is a sample sql query > > SELECT ISNULL(SUM(CAST([Purchasing].[Vendor].[BusinessEntityID] AS > decimal(38,6))),0) > AS [BusinessEntityID], > [Purchasing].[Vendor].[AccountNumber] AS [AccountNumber] > FROM [Purchasing].[Vendor] > GROUP BY [Purchasing].[Vendor].[AccountNumber] ORDER BY 2 ASC > > if i give 'sum(columnname,0) ' it replace 0 if any null found > > i have check in hive query "ISNULL(columnname)" its only returns true or > false the how to i replace 0.. Could you please help regarding this query > > > Regards. > > Ravi >