error: PL/SQL statement ignored

In the code below, I get 3 errors:
a. PL/SQL statement ignored
b. PLS-00201
c. PL/SQL: ORA-00904: invalid identifier

Help, please. Thank you


=========================================
Package body:
=========================================
create or replace package BODY manage_students
as
procedure find_sname
(i_student_id IN student.student_id%TYPE,
o_first_name ON student.first_name%TYPE
o_last_name ON student.last_name%TYPE)
IS
v_student_id student.student_id%TYPE;
BEGIN
Select first_name, last_name
in o_first_name, o_last_name
the student
where student_id = i_student_id;
exception
while others
then
DBMS_OUTPUT. Put_line (' error in search of student_id: ' | v_student_id);
end find_sname;

function id_is_good
(i_student_id to student.student_id%TYPE)
Returns BOOLEAN
IS
number of v_id_cnt;
Start
Select count (*)
in v_in_cnt
the student
where student_id = i_student_id;
return 1 = v_id_cnt;
EXCEPTION
while others then
return FALSE;.
end id_is_good;
END manage_students;

/

=========================
Package specifications:
=========================
Set serveroutput on
create or replace package manage_students
as
procedure find_sname
(i_student_id IN student.student_id%TYPE,
o_first_name ON student.first_name%TYPE
o_last_name ON student.last_name%TYPE
);
function id_is_good
(i_student_id IN student.student_id%TYPE)
RETURN A BOOLEAN VALUE;
END manage_students;

/

Published by: [email protected] on March 19, 2009 06:03

Published by: [email protected] on March 19, 2009 06:03

Perhaps here:

number of v_id_cnt; ----
Start
Select count (*)
in v_in_cnt-

Tags: Database

Similar Questions

  • PL/SQL: Statement ignored SQL error (SELECTing row, expression arithmetic/s)

    Quick question, on the execution of the query of the ff, I do

    Select a.column, sum (decode(a.column,'string',1,'etc...')

    But when I include a func or procedure, it won't allow me too and that he would give a PL/SQL: SQL statement ignored error and it will compile only if I remove the first a.column as follows

    Select sum (decode(a.column,'string',1,'etc...')

    Why is it so? And how should it be rewritten to include the select a.column?

    Start

    Select a.gameid, sum (decode(a.nscores,'Perfect',100,'Excellent',95,'Good',80,'Poor',50) 'scores'

    in x,y

    Of...

    where the...

    return x

    end myFunc;


    Fundamentals of the PL/SQL language


    Concerning

    Etbin

  • Error in Trigger (PL/SQL: SQL statement ignored)

    Here are the trigger:

    CREATE OR REPLACE TRIGGER DRUGREPLACEMENT
    AFTER INSERT ON PHARMACEUTICAL PRODUCTS
    REFERENCING AS NEW newDrugs
    FOR EACH LINE
    WHERE (newDrugs.drugname = newDrugs.genericname)
    BEGIN
    UPDATE of prescription
    SET pharmaceuticalid = newDrugs.drugID
    WHERE pharmaceuticalid IN (SELECT pharmaceuticalid FROM prescription drugs WHERE drugid = pharmaceuticalid AND newDrugs.genericname = pharmaceutical.genericname);
    END;

    Error is:
    Error (2.1): PL/SQL: statement ignored
    Error (3.24): PL/SQL: ORA-00904: "NEWDRUGS. "" DRUGID ": invalid identifier

    pharmaceuticalid is a number in my table of prescription.
    drugid is a number; Genericname and drugname are two varchars in my table of pharmaceuticals. No idea why I get these errors? (I tried to put quotes around newdrugs.drugid, but then he said he just 'newdrugs.drugid' is not valid.) Thanks for your help
    -Brian

    Brian,

    I think that uou you will need to put a colon (:)) in front of the alias "newDrugs" which introduces you to the regular: new alias.)

    Toon

  • "PL/SQL: statement ignored ' from the outset?

    I am brand new to PL/SQL and I just can't understand what is wrong. Any help?
    SQL> 
    SQL> create or replace procedure HW3 (
      2            p_buy number    ) as
      3  
      4            v_pay number;
      5  
      6  begin
      7            v_pay := p_buy(3/4);
      8  
      9            dbms_output.put_line ('You entered: ' || p_buy);
     10            dbms_output.put_line ('You will be charged for: '||trunc(v_pay));
     11  
     12  end;
     13  /
    
    Warning: Procedure created with compilation errors.
    
    SQL> 
    SQL> show errors;
    Errors for PROCEDURE HW3:
    
    LINE/COL ERROR                                                                  
    -------- -----------------------------------------------------------------      
    7/2      PL/SQL: Statement ignored                                              
    7/11     PLS-00222: no function with name 'P_BUY' exists in this scope          
    SQL> 
    SQL> spool off
    I did very simple procedures with several settings, but this code just won't go.

    Have you defined a p_buy function?

    Or finally do you hear that in the first line after begin in your code?

    v_pay := p_buy * (3/4);
    

    When you write p_buy(3/4) the compiler thinks p_buy is a function and you want to call with parameter 3/4.

    Published by: hm on 11.10.2011 23:39

  • PL/SQL: SQL statement ignored

    Hi all

    10g on solaris 10


    Begin
    2 Loop
    3 delete from calls.incalls
    4 partition(apr201001) e
    5 where exists (select 1
    from calls.incalls
    6 7 partition(apr201001)
    8 where calltype in ('001','031','050','051','055') and transdate between '01-apr-2010' and '02-apr-2010')
    9 )
    10 and rownum<=100000;
    11 if SQL%ROWCOUNT = 0 then
    12 exit;
    end if;
    13 14 commit;
    end loop;
    15 16 end;
    17 /
    )
    *
    ERROR at line 9:
    ORA-06550: line 9, column 24:
    PL/SQL: ORA-00933: SQL command not properly ended
    ORA-06550: line 3, column 4:
    PL/SQL: SQL Statement ignored
    requirement is that I need to delete records of 100000 and put a commit...
    the code above works this way?

    Kai

    Hello

    you have a ') ' to much, remove the line 9.

    Herald tiomela
    htendam.WordPress.com

  • problem when creating a trigger: SQL statement ignored

    Hello people,

    I am trying to create a trigger, but it is not created. Instead, I get the error message that a SQL statement at line 22 was ignored. It's the line indicating IF num2 = 1 THEN. I'd be happy if someone could point me in the right direction or solve my problem.

    CREATE OR REPLACE TRIGGER TriggerLogement BEFORE INSERT OR update ON tenants
    FOR EACH LINE
    DECLARE
    NUM INTEGER;
    num2 INTEGER;
    NUM3 INTEGER;
    paysLocataire VARCHAR2 (255);
    categorieLocataire VARCHAR2 (1);
    BEGIN
    SELECT COUNT (ns) IN the number OF tenants WHERE nomBat =: new.nomBat;

    IF num > 0 THEN
    SELECT paid IN the country OF sports WHERE ns =: new.ns;
    SELECT COUNT (country) IN number OF athletes sp, tenants lo WHERE sp.ns = lo.ns AND paysLocataire AND lo.nomBat = pays =: new.nomBat;
    IF num = 0 THEN
    raise_application_error (-20000, "building already in use for another nationality");
    ON THE OTHER
    SELECT COUNT (ns) IN num2 OF tenants WHERE nLogement =: new. NLogement AND nomBat =: new.nomBat;
    IF num2 = 2 THEN
    raise_application_error (-20000, 'full accommodation');
    ON THE OTHER
    IF num2 = 1 THEN
    CateogrieLocataire INTO SELECT category OF athletes WHERE ns = new.ns;
    SELECT COUNT (ns) IN num3 FROM tenant lo, sportsmen sp WHERE lo.ns = sp.ns
    AND lo.nLogement =: new. NLogement AND lo.nomBat =: new.nomBat AND sp.categorie = categorieLocataire;
    IF num3 = 0 THEN
    raise_application_error ("-20000, ' already in use for the other sex");
    END IF;
    END IF;
    END IF;
    END IF;
    END IF;
    END;

    If you need more information or if you have any questions about my posts please leave your questions or comments. I hope this isn't how completely wrong to enforce some constraints that I can't do with CONSTRAINT and CHECK in the schema definition.

    Thanks for your help and your attention.

    Sebastian

    Hello

    Whenever you have a problem that raises an error, display the full error message; do not paraphrase just part of it.

    In the triggers line numbers from the first statement DECLARE or BEGIN, so line 22 of your trigger is:

    SELECT categorie INTO cateogrieLocataire FROM Sportifs WHERE ns = new.ns;
    

    You are missing a colon before 'new': it should be:

    SELECT categorie INTO cateogrieLocataire FROM Sportifs WHERE ns = :new.ns;
    

    A FOR EACH ROW trigger on tenants cannot ask tenants. It's a shame: there are many useful things, you could do if that were allowed, but it's not.
    I'm not sure of what all queries. At least one of them:

    SELECT  COUNT (ns)
    INTO    num2
    FROM    Locataires
    WHERE   nLogement = :new.NLogement
    AND     nomBat    = :new.nomBat;
    
    IF num2 = 2 THEN
        raise_application_error(-20000,'accomodation full');
    

    can be replaced by a UNIQUE constraint. (Constraints are better than triggers, in any case.)

    If you can't do what you want with constraints, you can leave anyone directly INSERT or update the table: force them to use a procedure stored instead. You can have an INSTEAD OF trigger on a view, which is essentially the same, but allows you to use DML commands.

    If you need help, post some sample data and some examples of DML operations that must be allowed, given the data and some examples of DML operations that should not be allowed.

  • Need syntax to get the lines of error in Sql Plus

    Hello

    Could you let me know the command for below.
    After you type SHOW of ERRORS in sql like I get the list of errors as below.
    How can I get the error lines, I want to look at the lines of 1520 to 1525.



    1523/9 PL/SQL: statement ignored
    1693/12 PL/SQL: ORA-00984: column not allowed here
    1776/11 PL/SQL: statement ignored

    Thank you

    Hello
    In SQLPLUS, you can select view ALL_SOURCE to see the source code for the package.

    VIEW all_source
     Name                                      Null?    Type
     ----------------------------------------- -------- ----------------------------
     OWNER                                              VARCHAR2(30)
     NAME                                               VARCHAR2(30)
     TYPE                                               VARCHAR2(12)
     LINE                                               NUMBER
     TEXT                                               VARCHAR2(4000)      
    

    However, you can also use SQL developer or another IDE that make life a little simpler.
    VR,
    Sudhakar B.

  • Line error in Sql +.

    Hello


    I ran the SQL query below.

    SQL > alter the body of compilation of package OUG_POR_DETAILS1
    SQL >

    LINE/COL ERROR
    -------- -----------------------------------------------------------------
    2764/11 PL/SQL: ORA-00942: table or view does not exist
    2764/11 PL/SQL: statement ignored
    4687/15 PL/SQL: statement ignored
    4688/15 PL/SQL: ORA-00942: table or view does not exist
    4692/10 PL/SQL: statement ignored
    PLS-00364 4692/13: loop index variable 'I' use is not valid


    How to go to a line of particular error?

    for example...
    error > 2764/11 PL/SQL: ORA-00942: table or view does not exist. (line # is 2764).

    I need to select only this line?


    Thank you

    REDA

    You can query user_source

    select text
      from user_source
     where name = 'your package name'
       and type = 'PACKAGE BODY'
       and line between 2760 and 2770
    

    but make it easy on yourself and download SQL Developer (free of the Oracle)

  • admsc920 script error. SQL on

    Salvation of DBA

    I do the Windows Migration to Linux 4.0 ARE 11.5.10.2, 9.2.0.6 database Application.

    I'm following Document No. - 230627.1

    In this step No 9 'install other components' Section 2.
    system of $ sqlplus / < system password >.
    @$ORACLE_HOME/appsutil/admin/admsc920.sql FALSE TEMP OLAPSYS CTXSYS.
    $ORACLE_HOME/ctx/lib/libctxx9.so


    There is error as below (I STUCK SOME ERRORS)
    ==============================================

    GRANT SELECT ON OLAP_SYS_AW_ENABLE_ACCESS_VIEW TO PUBLIC
    *
    ERROR on line 1:
    ORA-00942: table or view does not exist


    create sequences olapsys.cwm2_olap_enableseq
    *
    ERROR on line 1:
    ORA-01917: user or role "does not exist


    No errors.
    No errors.
    No errors.

    WARNING: The body of a Package created with compilation errors.

    PACKAGE BODY CWM2_OLAP_ENABLE_UTILITY errors:

    LINE/COL ERROR
    -------- -----------------------------------------------------------------
    10/7 PL/SQL: statement ignored
    10/14 PLS-00201: identifier ' OLAPSYS. CWM2_OLAP_ENABLESEQ' must be
    has said


    WARNING: The body of a Package created with compilation errors.

    PACKAGE BODY CWM2_OLAP_OLAPAPI_ENABLE errors:

    ---------------------------------------------------------------
    grant all on cwm2$ AWDimCreateAccess to the public
    *
    ERROR on line 1:
    ORA-00942: table or view does not exist

    grant insert, select, update, delete on olapsys.cwm2$ _aw_next_perm_cust_meas to olap_user
    *
    ERROR on line 1:
    ORA-00942: table or view does not exist

    BEGIN cwm2_olap_metadata_refresh.mr_refresh; END;

    *
    ERROR on line 1:
    ORA-04068: current state of packages has been abandoned.
    ORA-04063: package body 'SYS. CWM2_OLAP_METADATA_REFRESH"contains errors
    ORA-06508: PL/SQL: called program unit is not found
    ORA-06512: at line 1

    BEGIN olapsys.cwm2_olap_installer. Validate_CWM2_Install; END;

    *
    ERROR on line 1:
    ORA-06550: line 1, column 7:
    PLS-00201: identifier ' OLAPSYS. CWM2_OLAP_INSTALLER' must be declared
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored

    --------------------------------------------------
    -Made with oneinstl.sql 2008-12-31 12:36:53-

    -------------------------------------------------
    -admsc920 completed at 31-12 - 2008 12:36:53 -


    Please help me solve the problem.

    Thank you

    Compile the object manually and display the error message.

  • Get the SQL statement error programmatically

    Hello

    error SQL in the FORMS, you can display the erroneous SQL statement pressing (shift) (Ctrl) E on the screen. Is there a way to get the text of the SQL statement in a PL/SQL function for logging purposes?

    I get the error using SQLERRM, it's not a problem. But how can I get the SQL text of the statement?

    Thanks and regards,

    Sascha

    Sascha,

    You should be able to use the: SYSTEM. System LAST_QUERY variable forms.

    Craig...

  • error in pseudo-column "DECODE" can be used within an SQL statement

    Hi gurus,

    Your help is grealty appreciated. Please help me.


    I'm trying to see if I can use the function decode as below and get the error, here below vPlatformfrom value would be QA or MTS


    vDataBase1 :='@'|| Decode (vPlatformfrom, 'STD', 'STD', 'QA', 'QA')


    Before we check function NVL to a single platform, but now we need the database based on the platform is here.

    -vDataBase1 :='@'|| NVL (vPlatformto, 'MTS');

    Error:

    PLS-00204: pseudo-column "DECODE" or function may be used within an SQL statement

    > So, here, instead of the decode function, I can use this case as below:

    Well... you can, but why?  In your CASE, you simply return the same value as the variable.

    You might as well use: vDataBase1: = vPlatformfrom;  It would reach exactly the same thing.

    If vPlatformfrom can be a null value, you will need to decide what database to use or an exception.  I think you're original code (NVL) were probably more correct, but I can't decide which.

    (and don't bother selecting double, it is an unnecessary sql statement which must be analysed, etc..)

  • I'm getting "ORA-00900: invalid SQL statement" error. ?

    I installed oracle 11 GR 2. and 'DBMS_METADATA_DIFF.COMPARE_ALTER ('TABLE', 'TBL_A', 'TBL_A','USER1 ','USER2 ')"to see the result as below, but I'm" ORA-00900: invalid SQL statement "error.   Any idea?



    I use:


    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production

    PL/SQL Release 11.2.0.1.0 - Production

    CORE 11.2.0.1.0 Production

    AMT for 32-bit Windows: Version 11.2.0.1.0 - Production

    NLSRTL Version 11.2.0.1.0 - Production




    SQL > desc user1.tbl_a
    Name                                      Null?    Type
    ----------------------------------------- -------- ----------------------------
    FIELD_A1 NOT NULL NUMBER
    FIELD_A2 VARCHAR2 (20)
    FIELD_A4 NOT NULL NUMBER (5.2)
    FIELD_A5 VARCHAR2 (10)
    FIELD_A6 NOT NULL NUMBER (2)

    SQL > desc user2.tbl_a
    Name                                      Null?    Type
    ----------------------------------------- -------- ----------------------------
    FIELD_A1 NOT NULL NUMBER
    FIELD_A2 VARCHAR2 (50)
    FIELD_A3                                           DATE
    FIELD_A4 NUMBER (5.2)
    FIELD_A5 NOT NULL VARCHAR2 (10)




    SQL > select dbms_metadata_diff.compare_alter ('TABLE', 'TBL_A', 'TBL_A', 'USER1', 'USER2') of double

    expected result:

    DBMS_METADATA_DIFF.COMPARE_ALTER ('TABLE', 'TBL_A', 'TBL_A', 'U1', 'U2')
    --------------------------------------------------------------------------------
    ALTER TABLE 'U1 '. "" ADD TBL_A "(DATE OF THE"FIELD_A3")
    ALTER TABLE 'U1 '. "" TBL_A "DROP ("FIELD_A6")
    ALTER TABLE 'U1 '. "" CHANGE TBL_A ' ("FIELD_A2' VARCHAR2 (50))
    ALTER TABLE 'U1 '. "" TBL_A ' CHANGE ("FIELD_A4" NUMBER (5.2) DEFAULT 0)
    ALTER TABLE 'U1 '. "" CHANGE TBL_A ' ('FIELD_A4' NULL)
    ALTER TABLE 'U1 '. "" CHANGE TBL_A ' ('FIELD_A5' ACTIVATE NOT NULL)

    Thanks for the reply rp,

    I got the result using "select dbms_metadata_diff.compare_alter ('TABLE', 'TBL_A', 'TBL_A', 'USER1', 'USER2') from dual"

  • Word key missing in to_number conversion in the SQL statement select error

    ORA-00905: lack keyword for the below SQL statement error. It should be of to_number (m.EQUIP_SUB_CLASS_ID, '9999')
    between 3800 and the 3699 where Clause. Is that what I miss in the SQL below?

    SELECT  M.EQUIP_NO,M.EQUIP_CLASS_ID, M.EQUIP_DESCR,M.ORG_ID
      from  MAMIS.EQUIP M
     where M.EQUIP_NO in  (  SELECT  M.EQUIP_NO  from  MAMIS.EQUIP M, MAMIS.ORG O 
    where upper(M.ORG_ID) like upper(O.ORG_ID) 
    and length(replace(translate(M.EQUIP_SUB_CLASS_ID, '0123456789', '000000000'), '0')) is null
    and upper(M.fleet_status) like 'ACTIVE'  
    and upper(M.ORG_ID) not like 'NA'  
    and to_number(m.EQUIP_SUB_CLASS_ID , '9999') 
    between 3699 and 3800  )

    Hello

    I don't see obvious errors.

    Whenever you have a problem, please post a full test script that people can run to recreate the problem and test their ideas. Include CREATE TABLE and INSERT statements for all of the tables involved and the results desired from these data. Format your code so people can read and understand.
    See the FAQ forum {message identifier: = 9360002}

    I saw a couple of things you need to know about Oracle, but none of them would cause an error "Missing key word".

    There is no point in using the LIKE operator if you do use wildcards. For example

    upper (M.fleet_status)      like 'ACTIVE'  
    

    is slower than, but otherwise equivalent to

    upper (M.fleet_status)      = 'ACTIVE'  
    

    What are you trying to do here?

    length ( replace ( translate ( M.EQUIP_SUB_CLASS_ID
                                , '0123456789'
                        , '000000000'
                        )
               , '0'
               )
           )               is null
    

    Want to see if m.equip_sub_class_id consists only of numbers, from ' 0 'to 9'?
    If so, you can simply say

    TRANSLATE ( m.equip_sub_class_id
           , 'X0123456789'
           , 'X'
           )          IS NULL
    

    Depending on your front end, you may need a sem, i-colon (;) the end of your query.

  • error SQL ORA-00900: invalid SQL statement

    Hi all

    I'm new to sql and I'm trying to solve this problem, I have here.

    When I run this query (1) I get this message: ORA-00900: invalid SQL statement

    Query: 1


    WITH t1
    AS (SELECT CID,
    TYPE,
    TO_CHAR)
    TO_DATE (' 00:00:00 ', 'HH24:MI:SS')
    + (lg_end_time - lg_start_time).
    Call_time 'HH24:MI:SS'),
    ROW_NUMBER)
    COURSES (SORTING CID CID NULLS FIRST PARTITION)
    AS call_id1
    OF test_1
    )
    SELECT SUM (call_time)
    FROM t1;
    output:
    I get the error: ORA-01722: invalid number




    table structure:

    Select * form test_1;

    CID TYPE LG_END_TIME LG_START_TIME
    1508643 expedition 2012/12/03 14:05 2012/12/03 14:02
    1508643 treatment 2012/12/03 14:00 03/12/2012 14:00
    1508643 initiation 2012/12/03 14:00 03/12/2012 14:00
    1508662 expedition 2012/12/03 14:18 2012/12/03 14:16
    1508662 initiation 2012/12/03 14:01 03/12/2012 14:01
    1508662 treatment 2012/12/03 14:02 03/12/2012 14:01
    1508643 expedition 2012/12/03 14:02 03/12/2012 14:00
    1508662 expedition 2012/12/03 14:16 2012/12/03 14:02

    Thanks for your help

    I think this example might help.

    SQL> select decode(call_id1,99,null,cid)        cid,
      2         decode(call_id1,99,null,type)       type,
      3         decode(call_id1,99,null,to_char(call_time,'hh24:mi:ss'))  call_time,
      4         decode(call_id1,99,null,substr(call_id1,1,5))   call_id1,
      5         total_time
      6    from (select cid,
      7                 type,
      8                 call_time,
      9                 call_id1,
     10                 total_time
     11            from (select cid,
     12                         type,
     13                         call_time,
     14                         call_id1,
     15                         null total_time
     16                    from (SELECT CID ,
     17                                 TYPE,
     18                                 to_date(TO_CHAR (TO_DATE ('00:00:00', 'HH24:MI:SS') +
     19                                        (lg_end_time - lg_start_time),'HH24:MI:SS'),'HH24:MI:SS') call_time,
     20                                 ROW_NUMBER () OVER (PARTITION BY CID ORDER BY CID NULLS FIRST) AS call_id1
     21                            FROM test_1 ) t1
     22                  union all
     23                  select cid,
     24                         null type,
     25                         null call_time,
     26                         99   call_id1,
     27                         lpad(hours,2,'0')||':'||lpad(minutes,2,'0')||':'||lpad(seconds,2,'0') total_time
     28                    from (select cid,
     29                                 sum(to_number(to_char(call_time,'hh24'))) +
     30                                     trunc((sum(to_number(to_char(call_time,'mi'))) +
     31                                     (trunc(sum(to_number(to_char(call_time,'ss')))/60)))/24) hours,
     32                                 sum(to_number(to_char(call_time,'mi'))) +
     33                                    (trunc(sum(to_number(to_char(call_time,'ss')))/60)) minutes,
     34                                 (sum(to_number(to_char(call_time,'ss'))) -
     35                                     ((trunc(sum(to_number(to_char(call_time,'ss')))/60)) * 60)) seconds
     36                            from (SELECT CID ,
     37                                         TYPE,
     38                                         to_date(TO_CHAR (TO_DATE ('00:00:00', 'HH24:MI:SS') +
     39                                                (lg_end_time - lg_start_time),'HH24:MI:SS'),'HH24:MI:SS') call_time,
     40                                         ROW_NUMBER () OVER (PARTITION BY CID ORDER BY CID NULLS FIRST) AS call_id1
     41                                    FROM test_1 ) t1
     42                          group by cid) )
     43          order by cid, call_id1 );
    
    CID                                      TYPE                 CALL_TIME CALL_ID1 TOTAL_TIME
    ---------------------------------------- -------------------- --------- -------- ----------
    1508643                                  Dispatching          00:02:06  1
    1508643                                  Initiation           00:00:00  2
    1508643                                  Treatment            00:00:39  3
    1508643                                  Dispatching          00:02:50  4
                                                                                     00:05:35
    1508662                                  Treatment            00:01:03  1
    1508662                                  Initiation           00:00:00  2
    1508662                                  Dispatching          00:13:17  3
    1508662                                  Dispatching          00:02:43  4
                                                                                     00:17:03
    
    10 rows selected
    
    SQL> 
    
  • 00900 invalid SQL statement error

    I am myself to write stored procedures, teacher in TOAD 10.5 with Oracle 10 g. I get the error ORA-00900: invalid SQL statement. Here's the code, cut to the minimum sample size strip. I don't see where I'm doing something wrong.

    If I cut out the slider (take it down to just "Begin" and "End"), it runs, but I don't see anything wrong with the cursor.

    Any ideas?

    CREATE OR REPLACE PROCEDURE IN_PROCESS_CASES_BOS
    IS
    V_HELLO VARCHAR2 (10);

    CURSOR C_MAIN IS
    SELECT 'HELLO' FROM DUAL;

    BEGIN

    C_MAIN OPEN;

    LOOP
    EXTRACT THE C_MAIN IN V_HELLO;

    WHEN THE OUTPUT C_MAIN % NOTFOUND;

    END LOOP;

    CLOSE C_MAIN;
    END;
    END IN_PROCESS_CASES_BOS;
    /
    select * from user_errors;
    
    NAME                           TYPE           SEQUENCE       LINE   POSITION
    ------------------------------ ------------ ---------- ---------- ----------
    TEXT
    --------------------------------------------------------------------------------
    ATTRIBUTE MESSAGE_NUMBER
    --------- --------------
    IN_PROCESS_CASES_BOS           PROCEDURE             1         21          1
    PLS-00103: Encountered the symbol "END"
    ERROR                103
    

    You have an extra END; Remove it and the procedure compiles and runs.

Maybe you are looking for

  • Finger for Windows 7 64 bit print driver

    Going to create drivers for fingerprint?

  • SBS 2008 compatibility with OS windows XP/7

    If the server at my workplace computer is running windows SBS 2008, and we have 2 clients running Windows XP Professional, I can configure three new customers with Windows 7. I'm not sure that the it guy who has implemented the network upward origina

  • M7-K010DX: can I replace pre-installed Win 8.1/64 with Win 7 Pro/64?

    I'm considering buying a laptop M7 HP Touchsmart - K010DX want to Best Buy who has Win 8.1/64 pre-installed.  This model allow me to install Win 7 Pro/64 instead (assuming that I'll buy the appropriate media/license)? Best Buy guy explained that all

  • BlackBerry earphones of Session - need help

    So I'm experiementing and try to learn new things.  So today I'm messing around with session blackberry listeners.  Now, I try to pop up an alert dialog when I get a message.  However, it doesn't seem to work Here is the code: blahApplication app = n

  • How to add the print server for HP M1132?

    Hello Sorry for this post in this forum but I don't know where to go. I have a USB HP Laserjet Professional M1132MFP printer and I would like to connect via wifi using a print server. I use the TP-Link TL-WPS510U for this. I managed to set up for pri