HI hyjacked..
but i am using a join query and i need only a function which converts the data from NULL to ZERO like NVL() in oracle.
The query which i am actually using is like this
SELECT AB.Producer_ID, SUM(MC.B_Quantity) AS TBQ, (SUM(MC.B_Quantity) + SUM(MC.C_Quantity)) AS TTQ, SUM(MC.B_Amount) AS TBA, SUM(MC.C_Quantity) AS TCQ, SUM(MC.C_Amount) AS TCA, (SUM(MC.B_Amount) + SUM(MC.C_Amount)) AS TTA, MAX(MyDistribution.TDue) AS TD, (TTA - TD) AS TA FROM (AB INNER JOIN MC ON AB.Producer_ID = MC.Producer_ID) LEFT JOIN `Select Sum(Due) As TDue,Producer_ID from Distribution Group by Producer_ID`. AS MyDistribution ON MC.Producer_ID = MyDistribution.Producer_ID GROUP BY AB.Producer_ID;
And i need the function for this field (MyDistribution.TDue) AS TD
can u help me.