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

Home -> Community -> Usenet -> c.d.o.server -> Re: How to create procedures without inserts (newbie switching from Sybase to Oracle)

Re: How to create procedures without inserts (newbie switching from Sybase to Oracle)

From: pcmodeler <mark.fergel_at_bankofamerica.com>
Date: 4 Oct 2004 05:30:33 -0700
Message-ID: <3e2d808a.0410040430.37579ed5@posting.google.com>


Thanks guys. I've mostly been using a couple of books that I have to try and figure this out.

Mark F.

Daniel Morgan <damorgan_at_x.washington.edu> wrote in message news:<1096676714.805575_at_yasure>...
> pcmodeler wrote:
>
> > OK, I've been using SQL Sybase stored procedures as a datasource for
> > Crystal Reports. I'm trying to learn Oracle as we are switching
> > environments.
> >
> > I see in Oracle that when you try to do standard select statements
> > within a procedure that they are always combined with insert
> > statements into a table.
>
> What you think you see is not correct. There is absolutely no
> need for an insert statement with a select so I am left wondering what
> it is you are looking at: Most certainly not the Oracle help info.
> on Crystal's web site which explicitly states that you MUST use an
> IN OUT ref cursor to return rows.
>
> The following procedure works quite nicely with Crystal Reports:
>
> CREATE OR REPLACE PROCEDURE child (
> p_NumRecs IN PLS_INTEGER,
> p_return_cur IN OUT SYS_REFCURSOR)
> IS
>
> BEGIN
> OPEN p_return_cur FOR
> 'SELECT * FROM all_tables WHERE rownum <= ' || p_NumRecs ;
>
> END child;
> /
>
> I don't see an insert statement anywhere.
Received on Mon Oct 04 2004 - 07:30:33 CDT

Original text of this message

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