 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Vladimir Stefanovic Guest
|
Posted: Fri Jul 01, 2005 3:22 pm Post subject: SQL & GROUP BY / Adding Record Numbers ... |
|
|
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
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|