Board index » delphi » SQL statement help needed
Jon Purvis
Delphi Developer |
SQL statement help needed2004-12-30 08:00:18 AM delphi231 D7Pro, Access 2000, TADOQuery The following query syntax works in MS-SQL, but when using Access I get a missing operator error. Removing the * from the *= allows it to run, but does not give the correct results. What is the correct syntax for Access? SELECT WholeName,GraduationDate,LastCertificationDate,SUM(TrainingHours) AS Training, SUM(ClassHours) AS Class,SUM(EventHours) AS Event,SUM(TravelHours) AS Travel FROM Members,AdvancedTraining,AdvancedTrainingParticipation,Classes,ClassParticipation, VolunteerEventsParticipation WHERE MemberLeft=0 AND Members.MemberID*=AdvancedTrainingParticipation.MemberID AND AdvancedTraining.Training=AdvancedTrainingParticipation.Training AND Members.MemberID*=ClassParticipation.MemberID AND Classes.Class=ClassParticipation.Class AND Members.MemberID*=VolunteerEventsParticipation.MemberID GROUP BY FirstName,LastName,WholeName,GraduationDate,LastCertificationDate ORDER BY by LastName,FirstName Thanks, Jon Purvis Texas Parks and Wildlife Dept Austin, TX |