Rdb on OpenVMS, IBM zSeries and Oracle on OpenVMS (MOSC)

MOSC Banner

RDBPROD: How can I get the row number in Rdb?

edited Feb 19, 2014 12:20PM in Rdb on OpenVMS, IBM zSeries and Oracle on OpenVMS (MOSC) 1 commentAnswered ✓

Example)

Assume a table with the following content:

Col_A     Col_B

1            2

1            5

1            8

2            1

2            9

3            5

3            6

I need to get the value of Col_B as well as the row number within the set for all rows with a certain value of COL_A.

In Oracle Database I would do this by:

SELECT COL_B, ROWNUM WHERE COL_A = 3;

This would give me the result:

5     1

6     2

I fail to figure out how to do this in Oracle Rdb. Any ideas?

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center