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 -> Re: Problem with FETCH

Re: Problem with FETCH

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Fri, 4 May 2001 12:15:50 +0200
Message-ID: <tf506lsjqa8m1a@beta-news.demon.nl>

"Daniel A. Morgan" <dmorgan_at_exesolutions.com> wrote in message news:3AF24CE7.F9D258FC_at_exesolutions.com...
> "Kast [WPM]" wrote:
>
> > 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.
>
> I am going to say this as nicely as I can and as charitably as I can.
>
> Oracle IS NOT SQL Server. Something for which I am extremely grateful.
>
> If you want to work with Oracle you must do two things.
>
> 1. Stop thinking it is a Microsoft product: It is not
> 2. Read the manuals and the books
>
> From an Oracle standpoint your code is at best laughable. You can't code
> like that. You can't think like that. And it will do you no good if anyone
> hands you the answer.
>
> Go buy a PL/SQL book and read it.
>
> Daniel A. Morgan
>

Daniel, while I agree for 200% with you, don't you think you will be flamed for this? I usually refrain from replying to similar posts, because I do get flamed.

Regards,

Sybrand Bakker, Oracle DBA Received on Fri May 04 2001 - 05:15:50 CDT

Original text of this message

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