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: Tony Dare <tonydare_at_yahoo.com>
Date: Fri, 01 Oct 2004 16:57:58 -0700
Message-ID: <3lm7d.62$c%1.69@news.oracle.com>


Please go to docs.oracle.com and look into the PL/SQL User's Guide and Reference.

SELECT x INTO y FROM z WHERE whatever; -- y is a VARIABLE, not a table

VARCHAR2 can be 32k in PL/SQL procedures and functions. The 4000 limit is for table columns only.

Cheers,

TD
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. I'm not looking to insert anything into a
> table. Just trying to draw out the data for use in a report.
>
> So, am I correct in that in order to do this I will need to start
> using ref cursors within a package? If so, does anyone have any good
> sources of examples, etc. that I could use in learning how to go about
> writing them?
>
>
> Also a bit off the primary subject, I have an example bit of code that
> another department wrote that includes the following:
>
> v_hiercd cdcur;
> v_sqlselect_st varchar2(9000);
>
> I can't find anything anywhere on those two (v_****). The closes I
> can find is a few references to v_sql and sqlselect. Nothing as
> written. I think the hiercd may be in reference to a field name in
> the database. Can someone explain to me exactly what is going on
> there? (And why does my Oracle book say varchar2 can be no larger
> than 4000?)
Received on Fri Oct 01 2004 - 18:57:58 CDT

Original text of this message

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