🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.database.ado
1 messages
1 total messages Started by Vladimir Stefanovic Fri, 01 Jul 2005 15:22
SQL & GROUP BY / Adding Record Numbers ...
#863
Author: Vladimir Stefanovic
Date: Fri, 01 Jul 2005 15:22
33 lines
1433 bytes
Hi,

I need help with SQL statement. If I have a basic
grouping statement like this:

   SELECT Field, COUNT(Field)
   FROM SomeTbl
   WHERE OtherField ='Something'
   GROUP BY Field
   ORDER BY Field

I'll get something like this:

   AAA      5
   BBB       3
   CCC      1
   DDD      6
   EEEE     3

But How can I assing the record numbers?

   1   AAA      5
   2   BBB       3
   3   CCC      1
   4   DDD      6
   5   EEEE     3




-- 
Best regards,
Vladimir Stefanovic 
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads