ca**********@yahoo.com (captain) wrote in message news:<27**************************@posting.google. com>...
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 --