Mar 16, 2010 #1 wexas45 MIS Joined Mar 11, 2010 Messages 9 Location GB Hello All Can you kindly advice what is wrong with this statement COALESCE (SUM(Cost)) AS Cost, I am getting this error Msg 102, Level 15, State 1, Line 11 Incorrect syntax near ')'.
Hello All Can you kindly advice what is wrong with this statement COALESCE (SUM(Cost)) AS Cost, I am getting this error Msg 102, Level 15, State 1, Line 11 Incorrect syntax near ')'.
Mar 16, 2010 #2 r937 Technical User Joined Jun 30, 2002 Messages 8,847 Location CA you forgot the second parameter -- COALESCE takes a minimum of two parameters (optionally, more than two) if SUM(Cost) is NULL, what value do you want? r937.com | rudy.ca Buy my new book Simply SQL from Amazon Upvote 0 Downvote
you forgot the second parameter -- COALESCE takes a minimum of two parameters (optionally, more than two) if SUM(Cost) is NULL, what value do you want? r937.com | rudy.ca Buy my new book Simply SQL from Amazon
Mar 16, 2010 #3 PHV MIS Joined Nov 8, 2002 Messages 53,708 Location FR I presume you wanted this: COALESCE (SUM(Cost)[!],0[/!]) AS Cost, Hope This Helps, PH. FAQ219-2884 FAQ181-2886 Upvote 0 Downvote
I presume you wanted this: COALESCE (SUM(Cost)[!],0[/!]) AS Cost, Hope This Helps, PH. FAQ219-2884 FAQ181-2886