Run package store procedure in sql developer

Night staff, I am using Oracle 11g, only that it gives the following error below, which can be wrong and how to rotate within the sql developer?
Warning(3,18): PLW-07203: o parâmetro 'CODCEP_EMP' pode se beneficiar do uso da hint do compilador NOCOPY
ror starting at line 1 in command:
exec buscadb.tabemp('09811370');
Error report:
ORA-06550: linha 1, coluna 7:
PLS-00306: número incorreto de tipos de argumentos na chamada para 'TABEMP'
ORA-06550: linha 1, coluna 7:
PL/SQL: Statement ignored
06550. 00000 - "line %s, column %s:\n%s"
*Cause:    Usually a PL/SQL compilation error.
*Action:
create or replace PACKAGE BUSCADB AS
TYPE t_cursor IS REF CURSOR;
PROCEDURE TABEMP(CODCEP_EMP IN OUT empresas.cep_emp%TYPE,io_cursor OUT t_cursor);
END BUSCADB;
create or replace PACKAGE BODY BUSCADB AS
PROCEDURE TABEMP(CODCEP_EMP IN OUT empresas.cep_emp%TYPE,io_cursor OUT t_cursor) AS
v_cursor t_cursor;
begin
open v_cursor for
select cod_emp,nom_emp,end_emp,cep_emp
from empresas
where cep_emp = codcep_emp;
io_cursor := v_cursor;
END TABEMP;
END BUSCADB;

These questions should be posted in the SQL And PL/SQL forum.
But I can give you this: READ the error. The procedure takes 2 parameters, you only give 1.
Regards,
K.

Similar Messages

  • How run Procedure in SQL Developer?

    I need run procedure in SQL Developer with parameter : 2009
    create or replace PROCEDURE "update_table" (ff_year in varchar2) AS
    CURSOR c_update IS
    select DISTINCT P.mafew name, u.frew nameone, t.greddf, .........
    I click green button RUN and have new window Run PL/SQL. Where in this script I need to print 2009?
    DECLARE
    FF_YEAR VARCHAR2(200);
    BEGIN
    FF_YEAR := NULL;
    update_table(
    FF_YEAR => FF_YEAR
    END;

    Hi,
    user10886774 wrote:
    Thanks all!
    I can run the procedure like 1 or 2 example? Is it right?
    1 like Run Script
    EXEC "UPDATE_TABLE" ('2009');
    2 click RUN on UPDATE_TABLE procedure
    DECLARE
    FF_YEAR VARCHAR2(200);
    BEGIN
    FF_YEAR := '2009';
    UPDATE_TABLE(
    FF_YEAR => FF_YEAR
    END;
    What is the name of the procedure?
    Is it update_tabe (all small letters)? If so, you must reference it as "update_table" (all small letters, inside double-quotes).
    Is it UPDATE_TABLE (all capital letters)? If so, you have the choice of referencing it as "UPDATE_TABLE" (all capital letters, inside double-quotes) or as update_table, or Update_Table, or UPDATE_TABLE, or uPdAtE_taBle, or ... (any kind of letters, without quotes).
    How about commit after?How about it?
    What is the question?
    If you want to commit, say COMMIT or click on the COMMIT icon.

  • Code runs correctly when compiled by SQL developer but not SQL Plus

    I have a rather large package body I need to deploy and compile ... It's big and complex (I inherited the project). Our it dept is huge and scripts are deployed by the dba team and they seem to only use sql plus. My code deploys and runs fine when compiled in sql developer. Once I compile it from SQL plus it stops working. It runs and using debug statements I can see the values are correct but it no longer inserts the data into the proper tables. I get ZERO errors or warnings when this is compiled in SQL Plus and no errors are generated from the code at run time. I've diffed the extracts of the code from the DB after each deployment and the only difference is the blank lines which SQL Plus strips out when you load the file. Has anyone run into anything remotely similar and if so how did you solve it? I've tried modifying the code to no avail, adding in comments to preserve the white space makes no difference. The thing that really kills me is that there is no error at all.

    Ok this is the problem area.... vReplyMessage is a clob. I've replaced it in this section of processing with a varchar2(32000). And now it works. I still would like to know why though. Nothing is changed when I load it though sqlplus or sql developer but this line " update swn_recip_response_t set SWN_RECIP_RESPONSE = vTextReply where notification_id = v_notification_id; " would never execute with the clob. Logging showed that the clob had the correct value though. I am puzzled.
    begin
    call_SWNPost('http://www.sendwordnow.com/usps/getNotificationResults',vMessageText, vReplyMessage, v_status_code, v_status_phrase, '');
    exception
    when others then
    raise eJavaException;
    end;
    vTextReply := dbms_lob.substr( vReplyMessage, 32000, 1 );
    if (vDebug) then
    update PEMS_PROD_2.SWN_POST_LOG set response = 'notif_id == '|| v_notification_id || 'status code == '|| v_status_code|| ' '||vTextReply where log_pk = vLogPK;
    commit;
    end if;
    IF v_status_code = 200 then
    v_has_error := 'N';
    ELSE
    v_has_error := 'Y';
    END IF;
    -- we handle all exceptions below in case something goes wrong here.
    -- this area can die silently.
    vTextReply := replace(vTextReply,'<getNotificationResultsResponse xmlns="http://www.sendwordnow.com/usps">', '<getNotificationResultsResponse xmlns:xyz="http://www.sendwordnow.com/usps">');
    begin
    insert into swn_recip_response_t(notification_id) values (v_notification_id);
    exception
    when others then
    if (vDebug) then
    err_num := SQLCODE;
    err_msg := SUBSTR(SQLERRM, 1, 100);
    insert into PEMS_PROD_2.SWN_POST_LOG (LOG_PK, create_date, REQUEST, notification_id) values(pems_prod_2.swn_post_log_seq.nextval,sysdate,
    'err_num - '||to_char(err_num)|| ' error_msg - '|| err_msg, v_notification_id);
    commit;
    else
    null;
    end if;
    end;
    commit;
    begin
    update swn_recip_response_t
    set SWN_RECIP_RESPONSE = vTextReply
    where notification_id = v_notification_id;
    exception
    when others then
    if (vDebug) then
    err_num := SQLCODE;
    err_msg := SUBSTR(SQLERRM, 1, 100);
    insert into PEMS_PROD_2.SWN_POST_LOG (log_pk, create_date, REQUEST, notification_id) values(pems_prod_2.swn_post_log_seq.nextval,sysdate,
    'err_num - '||to_char(err_num)|| ' error_msg - '|| err_msg, v_notification_id);
    commit;
    else
    null;
    end if;
    end;
    commit;
    -- parse through the XML document and update the notification and recipient records
    -- parse the clob into an xml dom object
    begin
    vReplyMessage := vTextReply;
    ...

  • How to open a package body in Oracle sql developer

    How to open a package body in Oracle sql developer..any shortcut for that

    I need another way to get to my package body. I'm on a locked down system, so the only way I can reference anything is if I already know the name of it. I accidentally overwrote my text document that I was using to work on it and I closed out of the package body in sqldeveloper. There must be a command, like an alter or some such. Anyone know the old fashioned way of looking at a package?

  • How to debug a Package / function in PL SQL developer ??

    How can we debug a Package / function in PL SQL developer ??
    i want to debug a code line by line

    Karthick_Arp wrote:
    This question does not belong to this fourm. We have a {forum:id=260} forum for such question.Not even there Karthick. PL/SQL Developer is a 3rd party tool, not Oracle's SQL Developer, so it doesn't even belong on the Oracle forums.

  • Running Stacked Queries in Oracle SQL Developer

    Is it possible to run stacked queries in Oracle SQL Developer???
    Something like this...
    SELECT *
    FROM TABLE_1
    SELECT *
    FROM TABLE_2
    SELECT *
    FROM TABLE_3
    And give my 3 different result sets in my Query Result window
    I tried "BEGIN" and "END" and Oracle SQL Developer did not seem to like it.
    Can someone let me know if this is possible and what the syntax might be???
    Thanks in advance for your review and am hopeful for a reply.
    PSULionRP

    Wrong forum!
    Please post this in the sql developer forum.
    SQL Developer
    You can run multiple queries exactly the way you posted them but you need to use F5 - the run script toolbar button.

  • How can I execute this procedure in sql developer, cursortype is refcursor

    PROCEDURE GET_CNTRY(CNTRY_NME_IN IN VARCHAR2 DEFAULT NULL,
    QRY_RSLT_OUT OUT CURSORTYPE) AS
    BEGIN
    OPEN QRY_RSLT_OUT FOR
    select
    CNTRY_NME,
    FRGN_CNTRY_CDE,
    INV_VEH_CNTRY_CDE,
    FRGN_CNCY_CDE,
    WTHH_PCT_COLA_CDE
    FROM
    CNTRY
    WHERE
    CNTRY_NME = NVL(CNTRY_NME_IN,CNTRY_NME);
    END GET_CNTRY;

    In SQL Developer run the following code as script (You need to hit F5 to run it as script).
    var rc refcursor
    exec get_cntry (<give your cntry_nme_in>, :rc)
    print :rc

  • Unable to see packages / triggers etc in SQL Developer 3.1.07

    Hi
    The user has SELECT_CATALOG_ROLE role granted but still cannot see packages of other users.
    Is there anything else I need to grant to this user in order that it may have visibility?
    Can't see package body in SQL Developer version 3.1 covers it to a point but I need more please.
    Thanks.
    This user has SELECT AND TABLE and CREATE SESSION.
    When I run this on the database connecting as this user I get rows returned which tells me its a SQL Developer thing?
    select text from dba_source where name like '%a_package_name%';
    Which could also mean I need to reinstall the damn thing doesn't it?
    SQL Developer 3.1.07
    DB 11.2.0.3.0
    Edited by: 869150 on Nov 15, 2012 6:41 AM
    Edited by: 869150 on Nov 15, 2012 7:07 AM
    Edited by: 869150 on Nov 15, 2012 7:34 AM

    Hi,
    The SELECT_CATALOG_ROLE should be sufficient as far as privileges go. I cannot recall at the moment, but there may well have been a bug or two fixed between 3.1.07.42 and 3.2.20.09.87 that solves this. Please try upgrading.
    Regards,
    Gary
    SQL Developer Team

  • How to debug a procedure in SQL Developer

    i am a plsql writer .... i use SQL Developer to connect to oracle on windows platform ... iam using oracle
    version 10g some time i need to debug a procedure or i want to run a procedure in debug mode
    please tell me how to do this SQL Developer

    There's great help inside sqldev, just follow the Help Contents - Concepts and usage - Running and debugging...
    Have fun,
    K.

  • Executing Procedures in sql Developer

    Hi ,
    I'm new to SQL Developer and trying to explore the tool . I have written a procedure as
    create or replace PROCEDURE SAMPLE2 AS
    studName Varchar2(8) ;
    BEGIN
    SELECT Stud1.NAME INTO studName
    FROM Stud1
    WHERE Stud1.NAME = 'SOM';
    END ;
    It has compiled perfectly .
    Now when I run by right clicking it works
    But when I'm running it using
    BEGIN
    exec SAMPLE2()
    END;
    or
    BEGIN
    SAMPLE2()
    END;
    it is giving error .
    Morover can you tell me how I can view the data after running the procedure .

    See Executing Anonymous Blocks in SQL Developer
    Remember statements always need to end with ;
    Regards,
    K.

  • Calling Procedure from SQL Developer

    Could anyone tell me how to call a Procedure from a SQL Worksheet using SQL Developer?
    I can run by right clicking the Procedure in the Connections window, but want to call it using SQL commands.
    I can run it using EXECUTE procedurename in SQL Plus but I get an ORA-00900 - invalid SQL statement if I try this in a SQL Worksheet. If I try CALL procedurename, I get an ORA-06576 - not a valid procedure or function name.
    Am I doing something daft (I've been using Oracle for 3 days)?

    begin
    procedure(params);
    end;

  • How to Execute SQL Server stored procedure through SQL Developer?

    Hi,
    I was successful in connecting SQL Server database using SQL Developer. I am able to see all the objects such Tables,Views & Procedure and also can query data using sql Query. But when it comes to executing procedure there's no option to achieve this. I tried "Exec |<Execute Procedure> Proc_name" but unfortunately both statement threw Errors.
    Please suggest about other alternates.
    Thanks in Advance,
    AP

    Hi,
    I was successful in connecting SQL Server database using SQL Developer. I am able to see all the objects such Tables,Views & Procedure and also can query data using sql Query. But when it comes to executing procedure there's no option to achieve this. I tried "Exec |<Execute Procedure> Proc_name" but unfortunately both statement threw Errors.
    Please suggest about other alternates.
    Thanks in Advance,
    AP

  • How to write a store procedure under SQL Server 2008

    Hi Folks,
    Kindly help me step by step how to create a simple store procedure with help of sql server 2008 r2 for Crystal report.
    I know how to work by using Universe but not SQL Server. Kindly help me how to hard code by using sql.
    Thanks in adv.
    Reddy

    For the actual syntax for programming the stored proc, you'll need to work with someone (or a website) who knows T-SQL.
    The cursor that gets returned from the stored proc must be an "in out" parameter for the stored proc.  For SQL Server I usually define a record type that includes the fields that will be returned and then return a set of records of that type.  Again, check with someone who is familiar with T-SQL for more information about how to do this.
    -Dell

  • Creating Procedure in SQL Developer 3

    CREATE OR REPLACE PROCEDURE INSERTION_MAIN_2_SP
    AS
    MID NUMBER;
    BEGIN
    SELECT SEQ_ID.NEXTVAL INTO MID FROM DUAL;
    INSERT INTO MASTER_TB VALUES(MID,'AKBER','HYDERABAD','INDIA');
    INSERT INTO DETAIL VALUES(SEQ_DETAIL.NEXTVAL,MID,SYSDATE,2,600,1);
    INSERT INTO DETAIL VALUES(SEQ_DETAIL.NEXTVAL,MID,SYSDATE,2,600,1);
    INSERT INTO DETAIL VALUES(SEQ_DETAIL.NEXTVAL,MID,SYSDATE,2,600,1);
    INSERT INTO DETAIL VALUES(SEQ_DETAIL.NEXTVAL,MID,SYSDATE,2,600,1);
    INSERT INTO DETAIL VALUES(SEQ_DETAIL.NEXTVAL,MID,SYSDATE,2,600,1);
    INSERT INTO DETAIL VALUES(SEQ_DETAIL.NEXTVAL,MID,SYSDATE,2,600,1);
    INSERT INTO DETAIL VALUES(SEQ_DETAIL.NEXTVAL,MID,SYSDATE,2,600,1);
    INSERT INTO DETAIL VALUES(SEQ_DETAIL.NEXTVAL,MID,SYSDATE,2,700,1);
    INSERT INTO DETAIL VALUES(SEQ_DETAIL.NEXTVAL,MID,SYSDATE,2,600,1);
    INSERT INTO DETAIL VALUES(SEQ_DETAIL.NEXTVAL,MID,SYSDATE,2,600,1);
    INSERT INTO DETAIL VALUES(SEQ_DETAIL.NEXTVAL,MID,SYSDATE,2,600,1);
    INSERT INTO DETAIL VALUES(SEQ_DETAIL.NEXTVAL,MID,SYSDATE,2,600,1);
    INSERT INTO DETAIL VALUES(SEQ_DETAIL.NEXTVAL,MID,SYSDATE,2,300,1);
    INSERT INTO DETAIL VALUES(SEQ_DETAIL.NEXTVAL,MID,SYSDATE,2,600,1);
    INSERT INTO DETAIL VALUES(SEQ_DETAIL.NEXTVAL,MID,SYSDATE,2,600,1);
    INSERT INTO DETAIL VALUES(SEQ_DETAIL.NEXTVAL,MID,SYSDATE,2,600,1);
    INSERT INTO DETAIL VALUES(SEQ_DETAIL.NEXTVAL,MID,SYSDATE,2,200,1);
    INSERT INTO DETAIL VALUES(SEQ_DETAIL.NEXTVAL,MID,SYSDATE,2,600,1);
    INSERT INTO DETAIL VALUES(SEQ_DETAIL.NEXTVAL,MID,SYSDATE,2,600,1);
    END INSERTION_MAIN_2_SP;
    Recieving Error :
    Error: ORA-06552: PL/SQL: Compilation unit analysis terminated ORA-06553: PLS-320: the declaration of the type of this expression is incomplete or malformed

    Hi Asif,
    If the sequences (seq_id, seq_detail) and tables (master_tb, detail) are in the connection's schema and defined with columns having the data types indicated in your code, then the DDL does compile in SQL Developer 3.0.
    Recall that privileges acquired via ROLE do not apply within PL/SQL procedures, so perhaps that is your problem. Otherwise make sure the data values in the INSERT statements map properly to the underlying column ordering in the tables.
    Regards,
    Gary Graham
    SQL Developer Team

  • Call Store Procedure in SQL Server

    How can I call an Oracle Store Procedure in a SQL Server procedure?

    Make sure you're calling the stored procedure with the same parameters at the same database. If that's not the case then send the procedure body and how you are calling it from code and DB .
    "If there's nothing wrong with me, maybe there's something wrong with the universe!"

Maybe you are looking for