Buy Support
Incidents |
If you can't find your answer
in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us
private or confidential information: |
Click Here
|
If you can't
login and post questions or you are having trouble viewing forum posts:
Click Here
|
Callback
Support |
If you live in USA, UK, Canada, Australia or New
Zealand, you can leave us details on your question and request us to call you back and discuss
them with you personally (charges apply). |
Click Here
|
Buy Support
Incidents |
If you can't find your answer
in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us
private or confidential information: |
Click Here
|
|
Error on summing a field on left outer join and group by |
Author |
Message |
|
Posted : 2007-09-28 07:32:46 |
I'm having a problem with the following query:
SELECT Customer.ListID, Customer.FullName, SUM(TimeTracking.DurationMinutes), TimeTracking.ItemServiceRefFullName FROM Customer LEFT OUTER JOIN TimeTracking ON Customer.ListID = TimeTracking.CustomerRefListID WHERE Customer.ListID = '2050000-1171313103' OR Customer.ListID = '8000027E-1182204360' GROUP BY TimeTracking.ItemServiceRefFullName ORDER BY Customer.FullName
This is the error that QODBC gives me: [QODBC] Column not found: FullName I tried just a normal join. It seems that it only give me this error when I add the "SUM" operator. Any help would be appreciated |
|
|
|
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2007-09-28 09:58:10 |
Your GROUP BY must specify the grouping of all columns used.
SELECT Customer.ListID, Customer.FullName, SUM(TimeTracking.DurationMinutes), TimeTracking.ItemServiceRefFullName FROM Customer LEFT OUTER JOIN TimeTracking ON Customer.ListID = TimeTracking.CustomerRefListID WHERE Customer.ListID = '2050000-1171313103' OR Customer.ListID = '8000027E-1182204360' GROUP BY TimeTracking.ItemServiceRefFullName, Customer.ListID, Customer.FullName ORDER BY Customer.FullName |
|
|
|
|