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

Home -> Community -> Usenet -> c.d.o.misc -> Re: creating a stored procedure gets error

Re: creating a stored procedure gets error

From: sunadmn <sunadmn_at_gmail.com>
Date: Thu, 07 Jun 2007 07:01:21 -0700
Message-ID: <1181224881.540349.294730@q75g2000hsh.googlegroups.com>


On Jun 7, 9:27 am, sybrandb <sybra..._at_gmail.com> wrote:
> On Jun 7, 3:11 pm, sunadmn <suna..._at_gmail.com> wrote:
>
>
>
> > All I am trying to build a stored procedure inside 10g and I keep
> > getting this error:
>
> > SQL> @"C:\Documents and Settings\x591833\Desktop\LastDay.sql"
>
> > Warning: Procedure created with compilation errors.
>
> > SQL> set arraysize 1
> > SQL> set maxdata 60000
> > SQL> show errors procedure LastDay
> > Errors for PROCEDURE LASTDAY:
>
> > LINE/COL ERROR
> > -------- ----------------------------------------------------
> > 4/3 PL/SQL: SQL Statement ignored
> > 4/7 PL/SQL: ORA-00922: missing or invalid option
>
> > This is the query:
>
> > CREATE OR REPLACE PROCEDURE LastDay
> > IS
> > BEGIN
> > set echo off
> > set heading off
> > COLUMN COUNT FOLD_AFTER 1
> > COLUMN GOOD_COUNT FOLD_AFTER 1
> > COLUMN FAIR_COUNT FOLD_AFTER 1
> > COLUMN PERIOD FOLD_AFTER 1
> > select 'COUNT: '||ONLINEFX.EVERYDAY_SUMMARY.COUNT,'GOOD_COUNT: '||
> > ONLINEFX.EVERYDAY_SUMMARY.GOOD_COUNT,'FAIR_COUNT: '||
> > ONLINEFX.EVERYDAY_SUMMARY.FAIR_COUNT,'UNACCEPTABLE_COUNT: '||
> > ONLINEFX.EVERYDAY_SUMMARY.UNACCEPTABLE_COUNT
> > from ONLINEFX.EVERYDAY_SUMMARY
> > where ONLINEFX.EVERYDAY_SUMMARY.PERIOD = to_char(sysdate-1, 'YYYY-MM-
> > DD');
> > END;
>
> > Does anyone have any idea what may be going on here?
>
> > Thanks,
> > -Steve
>
> set echo off
> set heading off
> and the four columns commands are all sql*PLUS commands.
> There aren't SQL, so you can't use them in PL/SQL.
>
> Apart from that, why aren't you using the solution you were provided 1
> or 2 days ago, and on which I took the trouble to explain to you?
>
> --
> Sybrand Bakker
> Senior Oracle DBA

I was just trying out different methods here seeing which was more efficient. I do appreciate all your time in explaining the query and how to set it up. I will go back and take another look at that and go forward from there.

Thank you again,
-Steve Received on Thu Jun 07 2007 - 09:01:21 CDT

Original text of this message

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