dbTalk Databases Forums  

rowid ?

comp.databases.oracle comp.databases.oracle


Discuss rowid ? in the comp.databases.oracle forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
captain
 
Posts: n/a

Default rowid ? - 07-28-2004 , 02:42 AM






hi,

Want to count rowid. One row by one row
and on each do a calculation and than go to next or previous row.

In oracle it is Rowid, wonder how to do in SAS for going by row.
e.g. in Oracle
Select * from table1 where rowid > rowid+1


Captain2010

Reply With Quote
  #2  
Old   
Mark D Powell
 
Posts: n/a

Default Re: rowid ? - 07-28-2004 , 08:53 AM






captain_2010 (AT) yahoo (DOT) com (captain) wrote in message news:<27aae5ab.0407272342.408a752a (AT) posting (DOT) google.com>...
Quote:
hi,

Want to count rowid. One row by one row
and on each do a calculation and than go to next or previous row.

In oracle it is Rowid, wonder how to do in SAS for going by row.
e.g. in Oracle
Select * from table1 where rowid > rowid+1


Captain2010
I think what you want is an explicit cursor written in pl/sql. See
the PL/SQL manaul.

declare
cursor c_example is select * from my_table;
begin
open c_example;
loop
fetch c_example into variable_list....
exit when c_example%notfound;
-- logic to do something here
end loop;
close c_example;
end;

Also look up Cursor For loops to have Oracle perform the open, fetch,
and close automatically rather than explicitly.

HTH -- Mark D Powell --


Reply With Quote
  #3  
Old   
Ed prochak
 
Posts: n/a

Default Re: rowid ? - 07-28-2004 , 12:32 PM



captain_2010 (AT) yahoo (DOT) com (captain) wrote in message news:<27aae5ab.0407272342.408a752a (AT) posting (DOT) google.com>...
Quote:
hi,

Want to count rowid. One row by one row
and on each do a calculation and than go to next or previous row.

In oracle it is Rowid, wonder how to do in SAS for going by row.
e.g. in Oracle
Select * from table1 where rowid > rowid+1


Captain2010
NOTE: comp.databases.oracle is obsolete. this topic is appropriate for
comp.databases.oracle.misc which I cross posted to with this reply.

Which do you want an answer for, ORACLE or SAS? These are two very
different systems.

If you want to count rows in an ORACLE system, use the SQL command:
SELECT COUNT(*) FROM table1 ;

HTH,
ed


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.