473,320 Members | 2,162 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,320 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 11264
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: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.