Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Help with IsNULL

Author  Topic 

suami
Starting Member

1 Post

Posted - 2008-10-27 : 06:49:41
hello,
Does someone know why i'm getting this error:


**** the select for t1****
)t1
LEFT JOIN (

SELECT ROUND(ISNULL(sum(p_sum),0),3) AS Total, fk_id AS id
FROM abc
GROUP BY id
)t2 ON t1.id = t2.id


and i'm getting this error:

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '0),3) as Total, fk_id as id
from abc
group b' at line 17

thanks!

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-10-27 : 07:03:42
This is a MS SQL Server forum. you seem to be using MySQL. post it in some MySQL forums to get more help. There's a MySQL forum at www.dbforums.com.
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-10-29 : 04:15:04
Use COALESCE in place of ISNULL

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -