MySQL Forums
Forum List  »  Microsoft Access

Another access to mysql query
Posted by: Ettienne Jolliffe
Date: August 18, 2010 03:25AM

I have problem with the following query:

SELECT tblCustomers.mcID, tblCustomers.mcFirstname, tblCustomers.mcLastname, tblCustomers.mcType, tblContactInfo.ContactType, tblContactInfo.ContactDetails, tblContactInfo.ContactDefault, Sum(iif(isnull(tblClaimed.Points) = true,0, tblClaimed.Points)) AS SumOfPoints, tblClaimed.Used, tblPoints.TotalPointsEarned, iif(tblPoints.TotalPointsClaimed=null,0,TotalPointsClaimed), (TotalPointsEarned-(TotalPointsClaimed+SumOfPoints)) AS probeer FROM ((tblCustomers LEFT JOIN tblContactInfo ON tblCustomers.mcID = tblContactInfo.mcID) LEFT JOIN tblClaimed ON tblCustomers.mcID = tblClaimed.mcID) LEFT JOIN tblPoints ON tblCustomers.mcID = tblPoints.mcID GROUP BY tblCustomers.mcID, tblCustomers.mcFirstname, tblCustomers.mcLastname, tblCustomers.mcType, tblContactInfo.ContactType, tblContactInfo.ContactDetails, tblContactInfo.ContactDefault, tblClaimed.Used, tblPoints.TotalPointsEarned, tblPoints.TotalPointsClaimed Having (((tblContactInfo.ContactDefault) = true ) And ((tblClaimed.Used) = 0 Or (tblClaimed.Used) Is Null)) ORDER BY tblCustomers.mcType

It keeps on telling me: Unknown column 'SumOfPoints' in 'field list'


Thanks

Options: ReplyQuote


Subject
Views
Written By
Posted
Another access to mysql query
3381
August 18, 2010 03:25AM
1434
August 19, 2010 11:57PM


Sorry, you can't reply to this topic. It has been closed.
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.