Error in the procedure block

Hi ,
I'm getting the error in the following block..
Could you please give a hint to solve this
Solved
Thank you
Edited by: Smile on Feb 19, 2013 2:04 AM

What does a weakly typed ref cursor have to do with any of this?
Cursor loops, of the type you appear to be trying to write have been obsolete this entire decade.
Please to go http://tahiti.oracle.com and look up BULK COLLECT and FORALL.
Demos here:
http://www.morganslibrary.org/library.html

Similar Messages

  • After installing a new version of Firefox, I get the error message "The procedure entry point JS_GetOperationLimit could not be located in the dynamic link library js3250.dll" when I try to start firefox. Elsewhere in the forum a complete reinstall is su

    After installing a new version of Firefox, I get the error message "The procedure entry point JS_GetOperationLimit could not be located in the dynamic link library js3250.dll" when I try to start firefox. Elsewhere in the forum a complete reinstall is suggested; however, I can't do that because of my company's IT policies. Is there any way to solve this problem WITHOUT a complete reinstall? Thank you!
    == This happened ==
    Every time Firefox opened
    == I installed a new version ==
    == User Agent ==
    Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; GTB6; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648)

    If you can't reinstall Firefox yourself then you need to contact your IT department and ask them to check the Firefox installation.
    It is possible that some files got broken with the latest update.

  • My problem is on my Windows PC.  I am getting the error message, "The procedure entry point sqlite_3_wal_checkpoint could not be located in the dynamic link library SQLite3.dll.  I am told this is related to iTunes.  Any help?

    I use both a Mac and a PC.  My problem is on my Windows 7 PC.  I am getting the error message, "The procedure entry point sqlite_3_wal_checkpoint could not be located in the dynamic link library SQLite3.dll.  I am told this is related to iTunes.  Any help out there?  Thanks

    With Windows Explorer, navigate to your C:\Program Files\Common Files\Apple\Apple Application Support folder.
    Copy the SQLite3.dll that you should find there, navigate to the nearby Mobile Device Support folder, and Paste it in there also.
    Restart the programme all should be well
    In case that your OS is (64 bit)
    1. Open windows explorer, go to location C:\Program Files (x86)\Common Files\Apple\Apple Application Support
    2. Copy file "SQLite3.dll"
    3. Now paste it in the folder  C:\Program Files (x86)\Common Files\Apple\Mobile Device Support
    4. Restart the programme, it should not display that message, it should be clear.
    Good Luck

  • I downloaded the latest version of itunes.  Now I cannot open iTunes.  I receive this error message: The procedure entry point AVCFAssetCreateWithByteStreamAndOptions could not be located in the dynamic link library AVfoundationCF.dll.  Thoughts?

    I downloaded the latest version of iTunes on my PC.  Now I cannot open iTunes.  I receive the following error message: "The procedure entry point AVCFAssetCreateWithByteStreamAndOptions could not be located in the dynamic link library AVfoundationCF.dll"  After pressing the "OK" button I receive a second error message: 'iTunes not installed correctly.  Please reinstall iTunes.  Error 7 (Windows error 127)".  I've uninstalled iTunes and reinstalled to no avail.  I've also eliminated the temp files (per suggestions on the trouble-shooting page) and no luck.  I also tried system restore and that did not fix the problem.  Any thougths on a repair?   

    Taken at face value, you're having trouble with an Apple Application Support program file there. (Apple Application Support is where single copies of program files used by multiple different Apple programs are kept.)
    Let's try something relatively simple first. Restart the PC. Head into your Add or Remove Programs control panel, select "Apple Application Support", click "Change" and then click "Repair".
    If no joy after that, try the more rigorous uninstall/reinstall procedure from the following post. (Although the procedure is for Vista and 7 and you've got XP, just read "Computer" as "My Computer", read "Uninstall a program control panel" as "Add or Remove programs control panel" and assume the system is 32-bit, and you'll be doing the right things.)
    Re: I recently updated to vista service pack 2 and I updated to itunes 10.2.1 and ever since I did that my itunes won't open any more.  Itunes starts but before anything loads a

  • Error in the procedure

    please find the error in the procedure
    CREATE OR REPLACE PROCEDURE MIS_TEST_3 AS
    CURSOR C2 IS SELECT EMP_PAY,EMP_GRD_PAY,EMP_BASIC FROM EMP_VIEW WHERE EMP_PAY_MONTH='FEB' AND EMP_PAY_YEAR='2011' AND EMP_CAT=5 ORDER BY EMP_NO;
    V_PAY NUMBER(12);
    V_GRD_PAY NUMBER(12);
    V_BASIC NUMBER(12);
    V_PAY_PAGE NUMBER(20);
    V_GRD_PAY_PAGE NUMBER(20);
    V_BASIC_PAGE NUMBER(20);
    V_PAY_LAST NUMBER(20);
    V_GRD_PAY_LAST NUMBER(20);
    V_BASIC_LAST NUMBER(20);
    I INTEGER;
    PAGE INTEGER;
    BEGIN
    OPEN C2;
    I:=0;
    V_PAY:=0;
    V_GRD_PAY:=0;
    V_BASIC:=0;
    V_PAY_PAGE:=0;
    V_GRD_PAY_PAGE:=0;
    V_BASIC_PAGE:=0;
    V_PAY_LAST:=0;
    V_GRD_PAY_LAST:=0;
    V_BASIC_LAST:=0;
    PAGE:=1;
    LOOP
    EXIT WHEN C2%NOTFOUND;
    FETCH C2 INTO V_PAY,V_GRD_PAY,V_BASIC ;
    DBMS_OUTPUT.PUT_LINE(LPAD(V_PAY,15,' '),LPAD(V_GRD_PAY,15,' '),LPAD(V_BASIC,15,' '));
    I:=I+1;
    V_PAY_PAGE:=V_PAY_PAGE+V_PAY;
    V_GRD_PAY_PAGE:=V_GRD_PAY_PAGE+V_GRD_PAY;
    V_BASIC_PAGE:=V_BASIC_PAGE+V_BASIC;
    V_PAY_LAST:=V_PAY_LAST+V_PAY;
    V_GRD_PAY_LAST:=V_GRD_PAY_LAST+V_GRD_PAY;
    V_BASIC_LAST:=V_BASIC_LAST+V_BASIC;
    IF MOD (I,10)=0 THEN
    DBMS_OUTPUT.PUT_LINE('------------------------------------------------------------------------------------------------------------------------------------------------------');
    DBMS_OUTPUT.PUT_LINE('SUB TOTAL PAGE '||PAGE||' '||LPAD(V_PAY_PAGE,15,' '),LPAD(V_GRD_PAY_PAGE,15,' '),LPAD(V_BASIC_PAGE,15,' '));
    DBMS_OUTPUT.PUT_LINE('-------------------------------------------------------------------------------------------------------------------------------------------------------');
    PAGE:=PAGE+1;
    V_PAY_PAGE:=0;
    V_GRD_PAY_PAGE:=0;
    V_BASIC_PAGE:=0;
    END IF;
    END LOOP;
    DBMS_OUTPUT.PUT_LINE('-----------------------------------------------------------------------------------------------------------------------------------------------------');
    DBMS_OUTPUT.PUT_LINE('SUB TOTAL PAGE '||PAGE||' '||LPAD(V_PAY_PAGE,15,' '),LPAD(V_GRD_PAY_PAGE,15,' '),LPAD(V_BASIC_PAGE,15,' '));
    DBMS_OUTPUT.PUT_LINE('---------------------------------------------------------------------------------------------------------------------------------------------------');
    DBMS_OUTPUT.PUT_LINE('GRAND TOTAL '|| LPAD(V_PAY_LAST,15,' '),LPAD(V_GRD_PAY_LAST,15,' '),LPAD(V_BASIC_LAST,15,' '));
    DBMS_OUTPUT.PUT_LINE('---------------------------------------------------------------------------------------------------------------------------------------------------');
    END ;

    user9950484 wrote:
    please find the error in the procedure
    CREATE OR REPLACE PROCEDURE MIS_TEST_3 AS
    CURSOR C2 IS SELECT EMP_PAY,EMP_GRD_PAY,EMP_BASIC FROM EMP_VIEW WHERE EMP_PAY_MONTH='FEB' AND EMP_PAY_YEAR='2011' AND EMP_CAT=5 ORDER BY EMP_NO;
    V_PAY NUMBER(12);
    V_GRD_PAY NUMBER(12);
    V_BASIC NUMBER(12);
    V_PAY_PAGE NUMBER(20);
    V_GRD_PAY_PAGE NUMBER(20);
    V_BASIC_PAGE NUMBER(20);
    V_PAY_LAST NUMBER(20);
    V_GRD_PAY_LAST NUMBER(20);
    V_BASIC_LAST NUMBER(20);
    I INTEGER;
    PAGE INTEGER;
    BEGIN
    OPEN C2;
    I:=0;
    V_PAY:=0;
    V_GRD_PAY:=0;
    V_BASIC:=0;
    V_PAY_PAGE:=0;
    V_GRD_PAY_PAGE:=0;
    V_BASIC_PAGE:=0;
    V_PAY_LAST:=0;
    V_GRD_PAY_LAST:=0;
    V_BASIC_LAST:=0;
    PAGE:=1;
    LOOP
    EXIT WHEN C2%NOTFOUND;
    FETCH C2 INTO V_PAY,V_GRD_PAY,V_BASIC ;
    DBMS_OUTPUT.PUT_LINE(LPAD(V_PAY,15,' '),LPAD(V_GRD_PAY,15,' '),LPAD(V_BASIC,15,' '));
    I:=I+1;
    V_PAY_PAGE:=V_PAY_PAGE+V_PAY;
    V_GRD_PAY_PAGE:=V_GRD_PAY_PAGE+V_GRD_PAY;
    V_BASIC_PAGE:=V_BASIC_PAGE+V_BASIC;
    V_PAY_LAST:=V_PAY_LAST+V_PAY;
    V_GRD_PAY_LAST:=V_GRD_PAY_LAST+V_GRD_PAY;
    V_BASIC_LAST:=V_BASIC_LAST+V_BASIC;
    IF MOD (I,10)=0 THEN
    DBMS_OUTPUT.PUT_LINE('------------------------------------------------------------------------------------------------------------------------------------------------------');
    DBMS_OUTPUT.PUT_LINE('SUB TOTAL PAGE '||PAGE||' '||LPAD(V_PAY_PAGE,15,' '),LPAD(V_GRD_PAY_PAGE,15,' '),LPAD(V_BASIC_PAGE,15,' '));
    DBMS_OUTPUT.PUT_LINE('-------------------------------------------------------------------------------------------------------------------------------------------------------');
    PAGE:=PAGE+1;
    V_PAY_PAGE:=0;
    V_GRD_PAY_PAGE:=0;
    V_BASIC_PAGE:=0;
    END IF;
    END LOOP;
    DBMS_OUTPUT.PUT_LINE('-----------------------------------------------------------------------------------------------------------------------------------------------------');
    DBMS_OUTPUT.PUT_LINE('SUB TOTAL PAGE '||PAGE||' '||LPAD(V_PAY_PAGE,15,' '),LPAD(V_GRD_PAY_PAGE,15,' '),LPAD(V_BASIC_PAGE,15,' '));
    DBMS_OUTPUT.PUT_LINE('---------------------------------------------------------------------------------------------------------------------------------------------------');
    DBMS_OUTPUT.PUT_LINE('GRAND TOTAL '|| LPAD(V_PAY_LAST,15,' '),LPAD(V_GRD_PAY_LAST,15,' '),LPAD(V_BASIC_LAST,15,' '));
    DBMS_OUTPUT.PUT_LINE('---------------------------------------------------------------------------------------------------------------------------------------------------');
    END ;Hi,
    Have you executed above procedure?? If so ,then please post the error what you are getting??
    Regards,
    Achyut

  • I just tried updating to iTunes 10.7 on my pc and when I try to launch it I get this error message-The procedure entry point AVCFPlayerSetDirect3DDevice could not be located in the dynamic library AVFoundationCF.dll.  Any Ideas?

    I just tried updating to iTunes 10.7 and when I try to launch it I get this error message-The procedure entry point AVCFPlayerSetDirect3DDevice could not be located in the dynamic library AVFoundationCF.dll.  Them it tells me to re-install iTunes and the same thing happens again.  Any Ideas?

    Taken at face value, you're having trouble with an Apple Application Support program file there. (Apple Application Support is where single copies of program files used by multiple different Apple programs are kept.)
    Let's try something relatively simple first. Restart the PC. If you're using Vista or 7, now head into your Uninstall a program control panel, select "Apple Application Support" and then click "Repair". If you're using XP, head into your Add or Remove Programs control panel, select "Apple Application Support", click "Change" and then click "Repair".
    If no joy after that, try the more rigorous uninstall/reinstall procedure from the following post. (If you've got XP, although the procedure is for Vista and 7, just read "Computer" as "My Computer", read "Uninstall a program control panel" as "Add or Remove programs control panel" and assume the system is 32-bit, and you'll be doing the right things.)
    Re: I recently updated to vista service pack 2 and I updated to itunes 10.2.1 and ever

  • Recently tried to update iTunes 12.0.1 and got this error message:  The procedure entry point ADAdPolicyEngine_DidEnterStation could not be located in the dynamic link library iAdCore.dll.

    I recently tried to update iTunes to 12.0.1 and got this error message:
    The procedure entry point ADAdPolicyEngine_DidEnterStation could not be located in the dynamic link library iAdCore.dll.
    After that, I get:  iTunes did not install properly.  Reinstall iTunes.
    I tried downloading iTunes again (without uninstalling it) and it won't download.
    Any suggestions?

    Thanks so very much, I have been looking for an answer to this for
    almost a week and just thought i'd look again and in 2 minutes my iTunes opened YIPPEE
    I must have installed deleted everything in order at least 15 times
    Is there anyways this cane get pinned to stay at top as it works and save people ploughing
    through post after post which is just asking the same question.
    Off to back up and I Cloud back up and see how it works without sidebar
    again thank you

  • Updated iTunes to 12.0.1 on XP after updated recieved error message "The procedure entry point ADAdPolicyEngine_DidEnterStation could not be located in the dynamic link dll" "itune not installed correctly error 7 (windows 127). reinstalled same error

    updated iTunes to 12.0.1 on XP after updated recieved error message "The procedure entry point ADAdPolicyEngine_DidEnterStation could not be located in the dynamic link dll" "itune not installed correctly error 7 (windows 127). reinstalled same error. Tried suggested steps
    Remove all of these items in the following order:
    iTunes
    Apple Software Update
    Apple Mobile Device Support (if this won't uninstall press on)
    Bonjour
    Apple Application Support
    Still getting same error message. Can anyone help me

    For general advice see Troubleshooting issues with iTunes for Windows updates.
    The steps in the second box are a guide to removing everything related to iTunes and then rebuilding it which is often a good starting point unless the symptoms indicate a more specific approach. Review the other boxes and the list of support documents further down page in case one of them applies.
    Your library should be unaffected by these steps but there is backup and recovery advice elsewhere in the user tip.
    tt2

  • Error message-- The procedure entry point ADiAdlD_AcquireMatchSlotIfNecessary could not be located in the dynamic link library C:\Program Files (x86)\iTunes\iTunes.dll

    Error message-- The procedure entry point ADiAdlD_AcquireMatchSlotIfNecessary could not be located in the dynamic link library C:\Program Files (x86)\iTunes\iTunes.dll

    See Troubleshooting issues with iTunes for Windows updates.
    Try the repair tip in the third box first.
    tt2

  • Itunes not working on my laptop. It gives me an error meassage, "The procedure entry point dispatch_get_specific could not be located in the dynamic link library "

    itunes not working on my laptop. It gives me an error meassage, "The procedure entry point dispatch_get_specific could not be located in the dynamic link library "

    See Troubleshooting issues with iTunes for Windows updates.
    The issue seems similar to that in the first box though it would be nice to have the complete error message. Tearing out all iTunes components and reinstalling as given in the second box should resolve.
    tt2

  • ITunes gives me an error and asks for re-installation, the error is "The procedure entry point CMBlockBufferCopyDataBytes could not be located in the dynamic link library coreMedia.dll", and the iTunes can not be lunched any more

    iTunes gives me an error and asks for re-installation, the error is "The procedure entry point CMBlockBufferCopyDataBytes could not be located in the dynamic link library coreMedia.dll", and the iTunes can not be lunched any more.
    can you please help, as I also tried to re-install it but pr

    Entry point errors can often be fixed by deleting the offending dll, then repairing the component it is part of. CoreMedia.dll is part of Apple Application Support.
    For general advice see Troubleshooting issues with iTunes for Windows updates.
    The steps in the second box are a guide to removing everything related to iTunes and then rebuilding it which is often a good starting point unless the symptoms indicate a more specific approach. Review the other boxes and the list of support documents further down the page in case one of them applies.
    Your library should be unaffected by these steps but there is backup and recovery advice elsewhere in the user tip.
    If the advice above doesn't resolve things you could try this alternate version:
    iTunes 12.1.0.71 for Windows (64-bit - for older video cards) - itunes64setup.exe (2015-01-28)
    which is a 64-bit installer for the 32-bit version of the core application, similar to previous 64-bit releases.
    Or roll back to the previous build:
    iTunes 12.0.1.26 for Windows (32-bit) - iTunesSetup.exe (2014-10-16)
    iTunes 12.0.1.26 for Windows (64-bit) - iTunes64Setup.exe (2014-10-16)
    tt2

  • Updating iTunes 12.1 and get error message "The procedure entry point CMBlockBufferCopyDataBytes could not be located in the dynamic link library CoreMedia.dll - what went wrong and how to resolve this?

    Updating iTunes 12.1 and get error message "The procedure entry point CMBlockBufferCopyDataBytes could not be located in the dynamic link library CoreMedia.dll". What went wrong and how to resolve this?

    Entry point errors can often be fixed by deleting the offending dll, then repairing the component it is part of.
    For general advice see Troubleshooting issues with iTunes for Windows updates.
    The steps in the second box are a guide to removing everything related to iTunes and then rebuilding it which is often a good starting point unless the symptoms indicate a more specific approach. Review the other boxes and the list of support documents further down the page in case one of them applies.
    Your library should be unaffected by these steps but there is backup and recovery advice elsewhere in the user tip.
    If the advice above doesn't resolve things you could try this alternate version:
    iTunes 12.1.0.71 for Windows (64-bit - for older video cards) - itunes64setup.exe (2015-01-28)
    which is a 64-bit installer for the 32-bit version of the core application, similar to previous 64-bit releases.
    Or roll back to the previous build:
    iTunes 12.0.1.26 for Windows (32-bit) - iTunesSetup.exe (2014-10-16)
    iTunes 12.0.1.26 for Windows (64-bit) - iTunes64Setup.exe (2014-10-16)
    tt2

  • Received error message "the procedure entry point_objc_init_image could not be located in the dynamic link library objc.dll.  unable to launch ICloud.  Any suggections?

    received error message  - the procedure entry point_objc_init_image could not be located in the dynamic link library objc.dll.  unable to launch iCloud.  Any suggections?

    I had roughly the same error. I fixed it by running the iCloud control panel update from apple software update. The problem cropped up after I ran the most recent iTunes update, I've personally been having issues with iTunes updates being finicky since upgrading to Windows 8.1, I've had to download installers rather than running the update directly through Software Update, so it's possible Apple is not fully addressing compatibility issues for newer versions of Windows. Ultimately it seems to be a missing file issue, so any update, installer, or install verification/repair that directly addresses the iCloud files should see and replace the missing file.
    Also it looks like Apple is either unaware of this problem or not addressing it at all, there are about a dozen support requests from within the last month all asking this same question regarding iCloud, just with different specific files unable to be found. None of them have answers.
    Hopefully this works for you

  • Error with stored procedure block datasource

    Hi all,
    I tried to base a datablock on a stored procedure in order to get better runtime performance. I work with Forms Builder 6i with patch 17 , and our database is oracle 8.1.7.1.4
    But when compiling I got errors.
    Here are what I did :
    create or replace type TSourceObject as object(name varchar2(30), propname varchar2(200));
    create or replace type TSourceTable is table of TSourceObject;
    create or replace procedure p_query_ntwk_chnl_mirror(p_tab IN OUT NOCOPY TSourceTable, p_action varchar2, p_lien number)
    is
    begin
    if p_action = 'VISU' then
    select TSourceObject(B.bdw_name, P.prop_bdw_name)
    bulk collect into p_tab
    from T_NETWORK_CHANNEL N, t_bdw_mw B, t_prop_bdw_mw P
    where B.comp_bdw = P.comp_bdw and P.comp_prop_bdw = N.comp_prop_bdw
    and EXISTS (SELECT 1
    FROM t_channel_element C
    WHERE N.comp_network_channel = C.comp_network_channel and comp_lien = p_lien);
    else
    select TSourceObject(B.bdw_name, P.prop_bdw_name)
    bulk collect into p_tab
    from T_NETWORK_CHANNEL N, t_bdw_mw B, t_prop_bdw_mw P
    where B.comp_bdw = P.comp_bdw and P.comp_prop_bdw = N.comp_prop_bdw;
    end if;
    end;
    Then I created the datablock with the wizard , I entered correctly the value of the arguments for the table type name, the argument p_action and the argument p_lien.
    And when compiling there was this alert error :
    Compiling QUERY-PROCEDURE trigger on NETWORK_CHANNEL_MIRROR data block...
    Compilation error on QUERY-PROCEDURE trigger on NETWORK_CHANNEL_MIRROR data block:
    PL/SQL ERROR 960 at line 5, column 9
    RPCs cannot use variables with schema level user-defined types in this release
    PL/SQL ERROR 0 at line 5, column 9
    Item ignored
    PL/SQL ERROR 320 at line 7, column 26
    the declaration of the type of this expression is incomplete or malformed
    PL/SQL ERROR 0 at line 7, column 1
    Statement ignored
    PL/SQL ERROR 320 at line 8, column 28
    the declaration of the type of this expression is incomplete or malformed
    PL/SQL ERROR 0 at line 8, column 1
    Statement ignored
    Compilation errors have occurred.
    So what should I do ?
    Thank you very much indeed.

    I create the package , and when creating the body then there was an error.
    Here is the package :
    create or replace package pkg_query_ntwrk_chnl_mirror
    is
    type TSourceObject is record(name varchar2(30), propname varchar2(200));
    type TSourceTable is table of TSourceObject index by binary_integer;
    procedure p_query_ntwk_chnl_mirror(p_tab IN OUT NOCOPY pkg_query_ntwrk_chnl_mirror.TSourceTable, p_action varchar2, p_lien number);
    end;
    create or replace package body pkg_query_ntwrk_chnl_mirror
    is
    procedure p_query_ntwk_chnl_mirror(p_tab IN OUT NOCOPY pkg_query_ntwrk_chnl_mirror.TSourceTable, p_action varchar2, p_lien number)
    is
    begin
    if p_action = 'VISU' then
         select B.bdw_name, P.prop_bdw_name
         bulk collect into p_tab
         from T_NETWORK_CHANNEL N, t_bdw_mw B, t_prop_bdw_mw P
         where B.comp_bdw = P.comp_bdw and P.comp_prop_bdw = N.comp_prop_bdw
         and EXISTS (SELECT 1
         FROM t_channel_element C
         WHERE N.comp_network_channel = C.comp_network_channel and comp_lien = p_lien);
    else
         select B.bdw_name, P.prop_bdw_name
         bulk collect into p_tab
         from T_NETWORK_CHANNEL N, t_bdw_mw B, t_prop_bdw_mw P
         where B.comp_bdw = P.comp_bdw and P.comp_prop_bdw = N.comp_prop_bdw;
    end if;
    end;
    end;
    And here is the error :
    7/2 PL/SQL: SQL Statement ignored
    8/20 PLS-00597: expression 'P_TAB' in the INTO list is of wrong type
    15/2 PL/SQL: SQL Statement ignored
    16/20 PLS-00597: expression 'P_TAB' in the INTO list is of wrong type
    And what is the problem here ? I think it is right!

  • Error in the procedure while tried to increment the seq

    Hello ,
    I tried the following but giving the errors..
    Plz help me in this..
    CREATE OR REPLACE PROCEDURE Seq_inc AS
       vmaxarrec number(10);
       vseq number(10);
          select max(recid) into vmaxarrec from acc_rec;
          select SEQ_ACC_REC.currval into vseq from dual;
        BEGIN
          FOR i IN vseq .. vmaxarrec  LOOP
            select SEQ_ACC_REC.nextval  from dual;
          END LOOP;
        END ;And giving the following errors...
    LINE/COL ERROR
    4/7 PLS-00103: Encountered the symbol "SELECT" when expecting one of
    the following:
    begin function package pragma procedure subtype type use
    <an identifier> <a double-quoted delimited-identifier> form
    current cursor
    The symbol "begin" was substituted for "SELECT" to continue.
    11/9 PLS-00103: Encountered the symbol "end-of-file" when expecting
    one of the following:
    begin case declare end exception exit for goto if loop mod
    null pragma raise return select update while with
    LINE/COL ERROR
    <an identifier> <a double-quoted delimited-identifier>
    <a bind variable> << close current delete fetch lock insert
    open rollback savepoint set sql execute commit forall merge
    Thanks

    smile wrote:
    SQL> CREATE OR REPLACE PROCEDURE Seq_inc AS
    2     vmaxarrec number(10);
    3     vseq number(10);
    4       
    5      BEGIN   
    6      select max(recid) into vmaxarrec from acc_rec;
    7      select SEQ_ACC_REC.currval into vseq from dual;
    8       
    9        FOR i IN vseq .. vmaxarrec  LOOP
    10          select SEQ_ACC_REC.nextval  from dual;
    11        END LOOP;
    12   
    13      END ;
    14  /
    Warning: Procedure created with compilation errors.
    SQL> sho err
    Errors for PROCEDURE SEQ_INC:
    LINE/COL ERROR
    10/9     PLS-00428: an INTO clause is expected in this SELECT statementI tried with the above correction ..and still errorsIt looks to me like you're trying to reset the sequence number to a new starting value. In reality there's very little point in doing this, though I've come across a few test scenarios where it's good to start with the same sequence number each time.
    The logic for changing a sequence to a particular value is along the lines of:
    SQL> select test.nextval from dual;
       NEXTVAL
           125
    SQL> var v_inc number;
    SQL> var v_resetno number;
    SQL> exec :v_resetno := 50;
    PL/SQL procedure successfully completed.
    SQL> exec execute immediate 'select -(test.nextval-:x)-1 from dual' into :v_inc using :v_resetno;
    PL/SQL procedure successfully completed.
    SQL> exec execute immediate 'alter sequence test increment by '||:v_inc;
    PL/SQL procedure successfully completed.
    SQL> select test.nextval from dual;
       NEXTVAL
            49
    SQL> alter sequence test increment by 1;
    Sequence altered.
    SQL> select test.nextval from dual;
       NEXTVAL
            50
    SQL> select test.nextval from dual;
       NEXTVAL
            51
    SQL>Note: In your code you are reading the currval of the sequence before you know that you've read the nextval. That will give an error, because the currval is only known within the current session after a nextval has been obtained.
    So, as a procedure, you want something like:
    CREATE OR REPLACE PROCEDURE Seq_inc AS
      v_maxarrec number;
      v_inc      number;
      v_seq      number;
    BEGIN   
      select max(recid)+1 into v_maxarrec from acc_rec; -- get the required sequence value
      select -(seq_acc_rec.nextval-v_maxarrec)-1 into v_inc from dual; -- determine the difference
      execute immediate 'alter sequence seq_acc_rec increment by '||v_inc; -- alter the sequence
      select seq_acc_rec.nextval into v_seq from dual; -- query the sequence to reset it
      execute immediate 'alter sequence seq_acc_rec increment by 1'; -- alter the sequence to increment by 1 again
    END ;(+untested+)

Maybe you are looking for

  • Upgrading Application Express on Oracle XE (installed on Ubuntu 8.04)

    I'd installed on my laptop (OP is Ubuntu 8.04) Oracle XE and is wotking quite fine. But I really like to upgrade apex to last version (3.1.2). I read documentation but are not many information about how to upgrade. Daniel

  • Printer RECOMMENDATIONS/Suggestions

    I would love one or all of your wireless printer recommendations. I had an HP and it wasn't great. Now I have a Cannon PIXMA and the colors are pale and can't scan wirelessly and just doesn't interact well with the Mac. What are your best suggestions

  • Can I turn my old router into a Wireless Acess Point?

    I have recently found my old BEFW11S4 V4 Wireless Router. It has the latest firmware. What I was wondering is it possible to turn it into an Access Point, so that I can increase the range of my Wireless Network. I currently have A wireless router on

  • Print insert result to a printer in TSQL trigger after insert - Need help.

    Hi, I am trying to print a record to a printer whenever a new record is inserted into a table called PrintTickets, using TSQL trigger for insert.  Is it possible to print a new inserted record to a printer? Here is the trigger tsql statement:  ALTER

  • Cinema Display Support Part.

    The support for my 15" cinema display bit the dust about three weeks ago. I've tried to fix it on my own but no amount of super glue will hold up the weight of the monitor. I am looking for a replacement of the failed support. Does anyone have an ext