Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Incorrect Syntax Error
Message
From
16/06/2008 11:27:25
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
 
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
01323625
Message ID:
01324437
Views:
10
Hi Kevin,

>Ok. I'm still not getting it.
>
>There are different things going on here - selection, grouping and ordering.
>
>Correct me if I'm wrong here:
>
>SELECT determine which records to return, not how they're returned.

Not exactly although I think you already understand this. Select determines which fields to return FROM which tables. It does not determine which records(rows). The WHERE clause would determine which rows to select.

>
>GROUP BY puts like records together in the dataset based on the columns in the GROUP BY clause.

Correct, and is exactly why you would have trouble returning the description. Once they are grouped by anther field, the description is different for each record in the group. Unless you also group by description.

>
>ORER BY sorts them within their groups.

Correct.
>
>
>So what does GROUP BY have to do with what records are returned?

It doesn't. I know you have this essentially but I suspect there was some confusion on what you were asking.
Tim
Timothy Bryan
Previous
Reply
Map
View

Click here to load this message in the networking platform