Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Group By
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
SQL Group By
Miscellaneous
Thread ID:
00733350
Message ID:
00733350
Views:
49
Select Dodah.A, Dodah.B, Blah.C, Blah.D, Big.E, Big.F
FROM Dodah INNER JOIN Blah on Blah.A = Dodah.A INNER JOIN Big ON Big.A = Dodah.A
GROUP BY Dodah.A, Dodah.B

I'm spoiled by fox! If I issue this command agains a foxpro table, I get one record for each instance of Dodah.A, Dodah.B. If I issue the same command against a SQL Table, I get an error for each of the fields not found in the group by.

Column 'Blah.C' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.

This appears to me to essentially make the group by useless in SQL for what I am trying to accomplish is this query. I can see how to do this with two queries, pull the unique Dodah.A, Dodah.B into one table then join back to the original table. But is there another way to make this work against SQL Tables?

Thanks
Donna
Donna D. Osburn
www.software-plus.net
Time flies whether you are having fun or not!
Next
Reply
Map
View

Click here to load this message in the networking platform