Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Problem with FETCH

Problem with FETCH

From: Kast [WPM] <Armin.Kast._at_WPM-Ingenieure.de>
Date: Thu, 03 May 2001 15:24:27 +0200
Message-ID: <3AF15C0B.DAE4A097@WPM-Ingenieure.de>

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US