By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,959 Members | 1,139 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,959 IT Pros & Developers. It's quick & easy.

sum() is not working

P: 24
Hi,
I am having database in debian os. In that sum() giving expected output.
I have changed my database from debian to lenny. In that sum() is not available. It shows the following error. Can any one help me to solve this ?

user => SELECT cmp_id ,sum(*) as count from schedules group by cmp_id;
ERROR: function sum() does not exist
LINE 1: SELECT cmp_id ,sum(*) as count from schedules group by cmp_i...
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
Jul 24 '10 #1

✓ answered by rski

I don't think you can use '*' in sum function. You should use column names.

Share this Question
Share on Google+
2 Replies


Expert 100+
P: 700
I don't think you can use '*' in sum function. You should use column names.
Jul 24 '10 #2

P: 24
Yes, absolutely .. I forgot .. now it is working fine.. Any way thanks...
Jul 26 '10 #3

Post your reply

Sign in to post your reply or Sign up for a free account.