473,386 Members | 1,973 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

rowid ?

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
Jul 19 '05 #1
2 11268
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 --
Jul 19 '05 #2
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


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
Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: droope | last post by:
I am trying to retrieve the rowid from a datatable without any success. When in the immediate window I can look at the rowid value, ex: ?DataSetName.Tables(0).Rows.Find(SearchValues).RowId ...
4
by: Corrine | last post by:
Hi, I am creating a global temporary table that is session-specific. I insert a BLOB into this table, and then select the BLOB from this table into a ResultSet. The ResultSet sees this BLOB...
2
by: tracy | last post by:
when i run the statement: SQL> select rowid from student_semester; ERROR at line 1: ORA-01445: cannot select ROWID from a join view without a key-preserved table student_semester is a view...
2
by: Scott Holland | last post by:
OK. I have a problem and need some help from DB2 Gurus. In ORACLE, I have a trigger which fires on an update event, sending the ROWID and TRANSACTION_ID via a pipe to my application. The...
3
by: TP | last post by:
Can someone please explain or provide examples of how to use ROWID in DB2 on Z/OS. I am using v7.1.1. Here is the table I created with the ROWID column. CREATE TABLE XXX.EMP_PHOTO_RESUME1 ...
0
by: UJ | last post by:
I have a datatable that I want to display the first 10 records, then display the next 10 records, and so forth. I'm storing the dataset in a session variable because as the user makes changes, they...
2
by: arivudai2 | last post by:
Hello, I am doing a migration of db from informix to db2.In informix there is a query with rowid.The same query with rowid is not working for DB2.Can anyone help me in this regard. for Ex. ...
0
by: kaapie | last post by:
Oracle does not know which table's rowid to return from this view and thus it gives an error. What this means is that one of the underlying tables in the view has to have either a primary key or...
2
by: captain | last post by:
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.