473,320 Members | 1,845 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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.
Jul 24 '10 #1

✓ answered by rski

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

2 8341
rski
700 Expert 512MB
I don't think you can use '*' in sum function. You should use column names.
Jul 24 '10 #2
Yes, absolutely .. I forgot .. now it is working fine.. Any way thanks...
Jul 26 '10 #3

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

Similar topics

6
by: mike | last post by:
I'm doing what I thought was a simple GROUP BY summary of fairly simple data and the my numbers aren't working out Some results are showing up <NULL> when I know the data is in the database ...
52
by: Paddy | last post by:
I was browsing the Voidspace blog item on "Flattening Lists", and followed up on the use of sum to do the flattening. A solution was: I would not have thought of using sum in this way. When...
9
by: asaguiar | last post by:
Hi, Given the pseudocode explanation of the Kahan algorithm at http://en.wikipedia.org/wiki/Kahan_summation_algorithm, I tried to implement it in C. It is supposed to minimize the effect of base...
4
by: crane.jake | last post by:
Hi, I'm trying to find the following information from the table found bellow. Year_Sales - # of sales that have occurred this year Year_Income - SUM(amount) Month_Sales - # of sales that have...
6
by: vinnie | last post by:
hi guys, i'm just at the beginning. I apologize. the file still gives me back an error: <<Parse error: syntax error, unexpected T_VARIABLE, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}'...
2
by: Samuels90 | last post by:
Hey everyone, I need to find a value in a pivot table with a range of values over 12 months (Book5) when 3 criteria are met, Branch#, LOB# and Month#. Sum(if() works for the 1st month, but I do...
0
by: user923005 | last post by:
typedef struct KahanAdder_t { double sum_; /* The current working sum. */ double carry_; /* The carry from the previous operation */ double temp_; /* A temp used to capture residual bits of...
3
by: dirknrw | last post by:
Hi, I have a tricky question!? :-) I'm using the perl -e command in order to match lines between two search patterns. The problem I have is, for the first example it is working, for the second...
3
by: ORB30 | last post by:
Hi all, Does anyone know how to work arround this problem of sum function in php? The below query is giving me wrong results SELECT SUM(((kinisis_1c + kinisis_1e + ((kinisis_1c /...
1
by: Brad Blankenshi | last post by:
I am creating a query that has multiples unions and a GROUP BY. If I remove the GROUP BY, it works, just doesn't provide the results I'm looking for. Can someone provide assistance to help me get...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.