sum() is not working

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • littlemaster
    New Member
    • Apr 2010
    • 25

    sum() is not working

    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.
  • rski
    Recognized Expert Contributor
    • Dec 2006
    • 700

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

    Comment

    • littlemaster
      New Member
      • Apr 2010
      • 25

      #3
      sum() not working

      Yes, absolutely .. I forgot .. now it is working fine.. Any way thanks...

      Comment

      Working...