Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

select statement

Former Member
0 Kudos

i have given following statement.

select * from BSID.

however, i want to select on the basis of record ranges

e.g.

select * from BSID where rowid <= 10000

select * from BSID where rowid > 10000

can i do that ? or is there any other option

Regards,

Santosh.

7 REPLIES 7

Former Member
0 Kudos

This message was moderated.

Former Member
0 Kudos

This message was moderated.

0 Kudos

ähm rowID can be EITHER smaller equal than 10k OR bigger, but NEVER it will be both at the same time...

naveen_inuganti2
Active Contributor
0 Kudos

This message was moderated.

Former Member
0 Kudos

Hi Santosh,

Basically in Oracle9i we usually use the ROWID to get a direct access to the data, basically for speed.

This is possible because the ROWID contains the physical address of the row.

If we defin a primary key (which should be done in any case for a good entitiy design) then a pseudo-column like ROWID is usually not required. We would simply use the primary key columns

When the above condition does not get satisfied then you can very well use ROWID.The syntax is given by our forum friends.

You can get the additional info about ROWID in the following link.

http://help.sap.com/saphelp_nw70/helpdata/en/d1/801fe4454211d189710000e8322d00/content.htm

Revert for furter clarification.

Thanks and Regards

Srikanth.P

Edited by: SRIKANTH P on May 26, 2009 3:39 PM

Former Member
0 Kudos

This message was moderated.

matt
Active Contributor
0 Kudos

I've rejected all answers that failed to notice that ROWID is not a field of BSID

For goodness sake - please apply a little thought before responding to questions.

To the original poster. In Open SQL you can't use ROWID. There is no concept of one record in a table being before another, unless some field with a counter or timestamp has been set up.

matt