Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Problem with FETCH
Hi,
I have a Problem with my Application under ORACLE.
Today it works proper with MS-SQL-Server but the Application
must also run under ORACLE.
With the MS-SQL-Server I can use the following Code:
This "Fetch" the FIRST, NEXT,PRIOR or LAST Entry from the DataBase with the used " ORDER BY " statement.
DECLARE ges_bw_cursor SCROLL CURSOR FOR SELECT bwnr FROM ges_bw ORDER BY
bwnr
OPEN ges_bw_cursor
DECLARE @bwnr_ CHAR(20)
FETCH FIRST FROM ges_bw_cursor INTO @bwnr_
SELECT @bwnr_
FETCH NEXT FROM ges_bw_cursor INTO @bwnr_
SELECT @bwnr_
FETCH PRIOR FROM ges_bw_cursor INTO @bwnr_
SELECT @bwnr_
FETCH LAST FROM ges_bw_cursor INTO @bwnr_
SELECT @bwnr_
CLOSE ges_bw_cursor
DEALLOCATE ges_bw_cursor
How can i do that on ORACLE ?
I have read about CURSORS but i canĀ“t understand how this works. Who has an example ?
I hope someone can understand my problems.
Sorry for my very bad english...
Thank you for any help.
Regards,
A.K.
Received on Thu May 03 2001 - 08:24:27 CDT