Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

counter in a select

513622Apr 25 2007 — edited Apr 27 2007
Hi, I need a counter in a select without using temporal tables. Simplified, it's:

select a.code, b.desc
from a, b
where a.code=b.code

(table a has several fields as pk, not only 'code')

and results are:

coda Barcelona
codb New York
codc New York
codd Paris
...

and should be

coda Barcelona 1
codb New York 1
codc New York 2
codd Paris 1

Using group by and nested selects I get the total of lines by city (eg: Barcelona 1, New York 2,...), but not the number of line.

Thanks!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 25 2007
Added on Apr 25 2007
19 comments
2,310 views