If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ANSI SQL > SQL's GROUPBY logic

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-25-05, 20:01
pas30339 pas30339 is offline
Registered User
 
Join Date: Jan 2005
Posts: 5
SQL's GROUPBY logic

I'm attempting to code what amounts to a GROUPBY in SQL.

Essentially I have a sort routine that I would like to modify so as to provide grouping by category.

Does anyone know the logic SQL typically employs to effect groupby?
Reply With Quote
  #2 (permalink)  
Old 02-25-05, 22:41
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,524
you'll need to give an example

based on what you've said, ORDER BY is what you want
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #3 (permalink)  
Old 02-26-05, 00:03
pas30339 pas30339 is offline
Registered User
 
Join Date: Jan 2005
Posts: 5
Quote:
Originally Posted by r937
you'll need to give an example

based on what you've said, ORDER BY is what you want
You are entirely correct! Doh!

I'll have n number of items each with a bitflag identifier, the bitflag being one of 7 possible values, and they need to be displayed in a predetermined order.

I think that the entire reason for the post is now null as i should be able to accomplish what I need in the sorting.

Thanks.

I need to back away from the computer for a while now. LOL!!
Reply With Quote
  #4 (permalink)  
Old 02-26-05, 05:24
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,524
a bitflag with 7 possible values? this i gotta see
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On