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: Daniel A. Morgan <dmorgan_at_exesolutions.com>
Date: Fri, 04 May 2001 05:49:16 -0700
Message-ID: <3AF2A54C.BD29545A@exesolutions.com>

Sybrand Bakker wrote:

> "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

If some do that is their privilege. I would normally not react this way if the person even put in a minimal amount of effort by opening a PL/SQL book. But this person obviously didn't even look at the cover of one. Rather than looking for a mistaken bit of TSQL mixed in this was pure TSQL without even the slightest evidence of effort to learn.

Being an American I have no problem saying this to a European ... it reminds me of the American tourist who goes to France and expects everyone there to speak English to accommodate them.

Daniel A. Morgan Received on Fri May 04 2001 - 07:49:16 CDT

Original text of this message

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