How to open a procedure

Once a procedure is created, how to open it in sql*plus?
null

Hi Arul,
To review the procedure
select text from user_source where name='PROCEDURE_NAME';
to execute the procedure
exec procedurename(parameters);
Regards
Anandhi
null

Similar Messages

  • Help: How to open wrapped store procedure on oracle database

    Dear Gurus,
    how to open the wrapped store procedure on oracle database?
    anyone can help me...?
    reply me soon
    take care

    Any other way so that I can see the flow of data that written on wrapped store procedure?You need to see the source code which has keeped outside of database. Read a wrapped code is not common for humans...
    reply me asap If you want an asap answer, raise a SR for oracle support, not through a forum which is based on volunteers.
    Nicolas.

  • How to open new window and generate oracle report from apex

    Hi,
    I had created an application that generates PDF files using Oracle Reports, following this Guide.
    http://www.oracle.com/technology/products/database/application_express/howtos/howto_integrate_oracle_reports.html
    And I followed 'Advanced Technique', so that users can't generate PDF file by changing URL and parameters. This is done for security reasons.
    But in this tutorial, when 'Go' button is pressed, the PDF file is displayed on the same window of apex application. If so, user might close the window by mistake. In order to avoid this, another window have to be opened.
    So, I put this code in the BRANCH - URL Target. (Note that this is not in Optional URL Redirect in the button property, but the branch which is called by the button.)
    javascript:popupURL('&REPORTS_URL.quotation&P2100_REP_JOB_ID.')
    But if the button is pressed, I get this error.
    ERR-1777: Page 2100 provided no page to branch to. Please report this error to your application administrator.
    Restart Application
    If I put the code 'javascritpt ....' in the Optional URL Redirect, another window opens successfully, but the Process to generate report job is not executed.
    Does anyone know how to open new window from the Branch in this case?

    G'day Shohei,
    Try putting your javascript into your plsql process using the htp.p(); procedure.
    For example, something along these lines should do it:
    BEGIN
    -- Your other process code goes here...
    htp.p('<script type="javascript/text">');
    htp.p('popupURL("&REPORTS_URL.quotation&P2100_REP_JOB_ID.")');
    htp.p('</script>');
    END;
    What happens is the javascript is browser based whereas your plsql process is server based and so if you put the javascript into your button item Optional URL Redirect it is executed prior to getting to the page plsql process and therefore it will never execute the process. When you have it in your branch which normally follows the processes, control has been handed to the server and the javascript cannot be executed and so your page throws the error "Page 2100 provided no page to branch to"... By "seeding" the plsql process with the embedded javascript in the htp.p() procedure you can achieve the desired result. You could also have it as a separate process also as long as it is sequenced correctly to follow your other process.
    HTH
    Cheers,
    Mike

  • How to Open & Close the periods in Asset Accounting for Depreciation.

    Dear All,
    How to to How to Open & Close the periods in Asset Accounting for Depreciation ? Please let me know
    If there is any T.Code or procedure for it.
    Your help is highly appreciated.
    Thanks & Regards,
    Pankaj.

    Dear Alex ,
    1) I am facing one problem that one of my asset 123 I Capitalized on 13.09.2006 have deactivated on
    14.05.2008. with value of Rs.1.00.000/- all the activities are closed down related it on deactivation date.
    In 2009 a new asset 456 purchased with different value. But in T.code OARP in column cumulative acquisition
    value it is showing value of Asset 123 instead of it's own capitalization value.
    2 ) And about my Asset 123 it is also showing a Cumulative Acquisition value in year 2009 which it
    should not display because I have already deactivated that asset. ( The same checked in AR03 )
    Please help.
    Your help is highly appreciated.
    Regards,
    Pankaj.
    P.S :- Keep the discussion on for further assistance.

  • How to call one procedure from another procedure

    Hi all,
    Could anyone give me clue how to call a procedure contains out parameters
    from another procedure.
    I had following procedures.
    1)
    create or replace procedure INS_PUR_ORDER
    p_poamt in number,
    p_podate in date,
    p_poid out number
    is
    begin
    select pkseq.nextval into p_poid from dual;
    insert into pur_order(poamt,podate,poid)
    values (p_poamt,p_podate,p_poid);
    end;
    2)
    create or replace procedure INS_PUR_ORDER_DETAIL
    p_pounits in number,
    p_poddate in date,
    p_poid in number)
    is
    begin
    Insert into pur_order_detail(podid,pounits,poddate,poid)
    values(pdseq.nextval,p_pounits,p_poddate,p_poid);
    end;
    I need to write a 3rd procedure which calls above two procedures.
    like
    call first procedure ,basing on the return value
    i.e if p_poid != 0 then
    we need to call second procedure
    in the loop.
    thanks in advance.
    rampa.

    Not sure what are you doing, you can not assign cursor to another cursor, may be you are looking for this?
    SQL> create or replace procedure proc1 ( result out sys_refcursor)
      2  is
      3  
      4  begin
      5     open result for
      6       select 'HELLO WORLD' from dual ;
      7  end proc1 ;
      8  /
    Procedure created.
    Elapsed: 00:00:00.01
    SQL> create or replace procedure proc2
      2  is
      3     l_cursor sys_refcursor ;
      4  begin
      5     l_cursor := proc1 ;
      6   
      7  
      8     open l_cursor;
      9     fetch l_cursor into l_text;
    10     dbms_output.put_line(l_text);
    11     close l_cursor;
    12  
    13  
    14  end proc2 ;
    15  /
    Warning: Procedure created with compilation errors.
    Elapsed: 00:00:00.01
    SQL> show error;
    Errors for PROCEDURE PROC2:
    LINE/COL ERROR
    5/4      PL/SQL: Statement ignored
    5/16     PLS-00306: wrong number or types of arguments
             in call to 'PROC1'
    6/4      PLS-00201: identifier 'L_TEXT' must be
             declared
    6/4      PL/SQL: Statement ignored
    8/4      PLS-00382: expression is of wrong type
    8/4      PL/SQL: SQL Statement ignored
    9/4      PL/SQL: SQL Statement ignored
    9/24     PLS-00201: identifier 'L_TEXT' must be
             declared
    10/4     PL/SQL: Statement ignored
    10/25    PLS-00201: identifier 'L_TEXT' must be
             declared
    ---- this is the correct waySQL>ed
      1  create or replace procedure proc2
      2  is
      3     l_cursor sys_refcursor ;
      4     l_text varchar2(100);
      5  begin
    ---- procedure call
      6     proc1(l_cursor); 
    7    -- open l_cursor;
      8     fetch l_cursor into l_text;
      9     dbms_output.put_line(l_text);
    10     close l_cursor;
    11* end proc2 ;
    SQL> /
    Procedure created.
    Elapsed: 00:00:00.01
    SQL> set serveroutput on
    SQL> execute proc2;
    HELLO WORLD
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.00
    SQL>

  • How to open a file created at the server through form/report at client end

    How to open a file created at the server through form/report at client end
    Dear Sir/Madame,
    I am creating a exception report at the server-end using utl file utility. I want to display this report at the client end. A user doesn't have any access to server. Will u please write me the solution and oblige me.
    Thanks
    Rajesh Jain

    One way of doing this is to write a PL/SQL procedure that uses UTL_FILE to read the file and DBMS_OUTPUT to display the contents to the users.
    Cheers, APC

  • How to call this procedure in my report to print my procedure output

    Hi,
    i have a table named letter,it contains 2 columns named as letter_id and letter_content.
    select * from letter;
    letter_id letter_content
    103 Dear MFR
    103 This is in regards to the attached DM List
    103 Please Credit us after reviewing it.
    103 Thanks
    103 Regards
    103 xxxx
    108 Dear customer
    108 This is to inform that ur DM List is as follows
    108 Credit us according to the Dm after reviewing it.
    108 Thanks
    108 Regards
    108 xxxx
    now my requirement is,i need send a parameter as letter_id to a procedure or function in pl/sql in oracle,the output should be as follows:
    if we will pass parameter(letter_id) = 103 then it displays as follows:
    Dear MFR
    This is in regards to the attached DM List.Please Credit us after reviewing it.
    Thanks
    Regards,
    XXXXX.
    if we will pass parameter(letter_id) = 108 then it should displays as follows:
    Dear customer,
    This is to inform that ur DM List is as follows. Credit us according to the Dm after reviewing it.
    Thanks
    Regards,
    XXXXX.
    the procedure for my requirement is like below.now my problem is how to call this procedure in my report.so that if i will send a parameter as letter_id then it should get my report stated above.
    CREATE OR REPLACE PROCEDURE letter_text ( p_letter_id letter.letter_id%TYPE , p_letter_contents_out OUT SYS_REFCURSOR )
    IS
    BEGIN
    OPEN p_letter_contents_out
    FOR
    SELECT letter_content
    FROM letter
    WHERE letter_id = p_letter_id
    ORDER BY line_seq;
    END letter_text;
    which you might call with something like
    SQL> var results refcursor
    SQL> exec letter_text(103, :results)
    PL/SQL procedure successfully completed.
    SQL> print :results;
    CONTENT
    Dear MFR
    this is in regards to the attached DM List
    Please credit us after reviewing it
    thanks
    Regards
    EXP
    6 rows selected.
    so, the same out put i need to get it in a report.
    Thanks

    Thanks for ur suggestions.
    i have 2 select statements.1st query is the main query for the report.so i used it at the time of report created with datablock.
    now my 2nd query is
    select letter_content
    from ( select content_seq,
         content || case content_seq
    when 2 then
    ' ' || lead(content) over (partition by letter_id order by content_seq)
    end as letter_content
    from exp_letter_contents
         where letter_id = 103)
    where content_seq <> 3;
    i had taken 2parameters 1 for the main query and 2nd is for the above query(parameter is letter_id).
    now i have to write the above select statement in the report.
    so i had taken a field object in the report and then i had written this code in before report trigger.
    function letter_contentFormatTrigger return boolean is
    begin
    select letter_content
    from ( select content_seq,
                        content ||
                        case content_seq when 2 then
                             ' ' || lead(content) over (partition by letter_id order by content_seq)
                        end as letter_content
              from exp_letter_contents
              where letter_id = 103)
    where content_seq <> 3;
    return (letter_content);
    end;
    when i tried to compile it.i got an error as follows :
    error 103 at line6,column 5
    encountered the symbol "CASE" when expecting one of the following:
    (- + mod null <an identifier>
    <a double-quoted delimited-identifier><a bind variable> avg...etc
    so,where can i write this select statement.
    i am using oracle reports6i
    Message was edited by:
    user579585

  • How to open a htmlwebpage by using pl/sql?

    my problem is how to open/invoke a existing webpage by using pl/sql.Because I want to do a authentication function,and write a procedure to varify the user ID and password.If they are valid,a welcome webpage can display,otherwise a eror message/webpage will be invoked.
    My question is how to display the error message to the webpage or to open a webpage which display the error message by using pl/sql.

    I think you may be in the wrong forum, but anyways...
    What I think your looking for is the htp.print('insert html here'); function. It's plsql, and writes out html to the web server that calls it.
    if you search for htp.print you should find loads of examples.
    hope this helps.
    Merv.

  • How to open the body of nokia N72

    It seems that some moisture has entered my Nokia N72 since last 10 hours the screen appears grey and there is a display problem. Can any one help me by showing me how to open the body of Nokia N72 by step by step description or diagrammatically?

    Sorry but it is against the rules of this forum to discuss warranty voiding procedures like disassembly, regardless of your personal warranty status.
    Try one of the many unofficial forums, that you can find by searching google, for help. 

  • How to open my phone lock

    how to open my phone lock

    If you're asking how to get your phone carrier unlocked, ONLY the carrier it is locked to can authorize unlocking. You will have to contact them and ask what the procedure is. If it is locked to AT&T in the US and you want to use it with a different carrier, you may as well sell it and buy a new one. AT&T will NOT unlock iPhones under any circumstances.

  • How to open an .indd file in commands

    does any one know how to open an .indd file in commands from a plugin(without opening from the normal procedure..File -> Open ...)
    in my plugin I tried,
      SDKFileOpenChooser fileChooser;
    fileChooser.AddAllFiles();
    fileChooser.ShowDialog();
         It shows the dialog window to choose a file. but i don't know what to use that file to be apperead in Indesign application.
    If you have any idea please let me know..

    Here's a sample function I use:
    // Create an OpenDocCmd:
            InterfacePtr<ICommand> openDocCmd(CmdUtils::CreateCommand(/*kOpenDocCmdBoss*/ kOpenFileCmdBoss));
            if (openDocCmd == nil)
                break;
            // Get an IOpenFileCmdData Interface for the OpenDocCmd:
            InterfacePtr<IOpenFileCmdData> openFileData(openDocCmd, IID_IOPENFILECMDDATA);
            if (openFileData == nil)
                break;
            // Set the IOpenFileCmdData Interface’s data:
            openFileData->Set(docSpec, uiFlags, openFlags ,IOpenFileCmdData::kNotUseLockFile);
            // Process the OpenDocCmd:
            error = CmdUtils::ProcessCommand(openDocCmd);
            if (error)
                break;
    // Create a layout window for the new doc:
            InterfacePtr<ICommand> newWinCmd(CmdUtils::CreateCommand(kOpenLayoutCmdBoss));
            newWinCmd->SetItemList(UIDList(*openDocCmd->GetItemList()));       
            error = CmdUtils::ProcessCommand(newWinCmd);
    Make sure of error checks!
    OR Search for SDKLayoutHelper Class Reference

  • How to compile my procedure.

    create or replace procedure sp_trans_log(i_trans_id number) as
    TYPE tab_trans IS RECORD
    v_table_name varchar2(20),
    v_mode varchar2(3)
    TYPE tb_trans_tbl IS TABLE OF tab_trans INDEX BY BINARY_INTEGER ;
    v_trans_tbl tb_trans_tbl;
    begin
    execute immediate 'select table_name,mode from transaction_detail where i_trans_id = 1'
    bulk collect into v_trans_tbl;
    FOR i IN 1..v_trans_tbl.COUNT LOOP
    if v_trans_tbl(i).mode = 'I' then
    -- My procedure is not getting compiled because of the below statement. The sql file gets executed based on
    the no of records present in pl sql table . How to make the procedure a compiled one.
    @C:\gaioscodes\jul20\thatinsert.sql v_trans_tbl(i).v_table_name;
    end if;
    if v_trans_tbl(i).mode = 'U' then
    @C:\gaioscodes\jul20\thatupdatescript v_trans_tbl(i).v_table_name;
    end if;
    if v_trans_tbl(i).mode = 'D' then
    @C:\gaioscodes\jul20\thatDELETE v_trans_tbl(i).v_table_name;
    end if;
    end loop;
    end;

    Vinodh2 wrote:
    begin
    prompt set serveroutput on
    end;
    the above file is test.sql
    i am writing a code as below:
    begin
    @c:\test.sql;
    end;
    "@", "prompt" and "set serveroutput on" are all SQL*Plus commands. You cannot issue these inside PL/SQL code.
    Let's keep it simple and assume you have a script called "runme.sql" and it contains the following:
    set serveroutput on
    spool c:\tmp.output.txt
    begin
      my_procedure(123);
    end;
    spool offand the my_procedure procedure is like:
    PROCEDURE my_procedure(p_value IN NUMBER) IS
    BEGIN
      DBMS_OUTPUT(TO_CHAR(p_value*p_value,'fm999999')); -- display the square of the number
    END;and you want to put that into a procedure on the database.
    Firstly, the "set serveroutput on" is an SQL*Plus command that enables the output buffer to be displayed if any code uses DBMS_OUTPUT to put out information.
    PL/SQL has no user interface, so there is no such concept as a place where output can be displayed. Therefore we will just have to abandon the set serveroutput on statement for our PL/SQL
    Next, "spool" is a SQL*Plus command that takes output and puts it into the specified file. PL/SQL doesn't have a native spool feature, but it does have packages that allow data to be written into files. e.g. UTL_FILE. So we can do something with that to convert it.
    Next the procedure call. It simply does some calculations and outputs the data using DBMS_OUTPUT, which our SQL*Plus script is capturing and putting out to the spool file. Hang on though, we can't spool in PL/SQL so that procedure will have to be re-written a little.
    So let's just put all that into our procedure and make life simple...
    CREATE OR REPLACE DIRECTORY MYDIR AS 'C:\TMP'
    PROCEDURE my_procedure(p_value IN NUMBER) IS
      fh  UTL_FILE.FILE_TYPE;
    BEGIN
      fh := UTL_FILE.FOPEN('MYDIR','output.txt','w',32767);
      -- DBMS_OUTPUT(p_value*p_value); -- display the square of the number
      UTL_FILE.PUT_LINE(fh, TO_CHAR(p_value,'fm999999'));
      UTL_FILE.FCLOSE(fh);
    END;
    /This procedure now opens a file, writes out the data and closes the file again. No spooling, no server output using DBMS_OUTPUT, just all self-contained within the PL/SQL code.
    Now, you need to do something similar with your own code. Take what you are doing in your scripts and put them into procedures and just have one procedure call other procedures as necessary. Stop confusing yourself by mixing SQL*Plus scipts and PL/SQL code.

  • LX800 Series - How To Open Case to Change Hard Drive?

    Hi Everyone,
    Is there anyone out there that can advise me on the best method for Opening My LX series AIO case , so that I can put a new hard drive in it..
     - I have a good image bacup and the Skills to swap the hard drive , I just have no idea on how to open the case.
    Sadly , I have searched pretty much everywhere but cannot find a procedure.. and of course its not in the Toshiba manual that I have access to , I am told there are technical manuals but not available to "end users" like me.
    I have found instructions for another model on these foroums , but its different as the case is very different , and uses clips.
    Would be VERY grateful for any help as I do not want to mess up my case as its only just out of warranty with a "clicking" hard drive that wil not boot.
    Thanks in advance..
    Solved!
    Go to Solution.

    Ok , so replaced the hard disk today in my LX800 Series AIO - here is the procedure to open the case - This procedure is quite different from the others (PX Model) I have seen posted at these forums.
    1) Lay your AIO flat down on a cloth or blanket.
    2) Remove the FIVE main Black screws from the rear Perimeter of the case.
    3) Remove the Screw that sits just above the Bar Code label and then remove the DVD/Bluray Drive , by giving it a firm pull.
    4) Remove the hidden (Keyboard/Mouse) USB adaptor that sits behind the door at the bottom left had portion of the back of the machine.
    5) Once the above USB is removed it reveals a small screw under it - remove this screw.
    6) Open the memory access door , there is a small screw revealed - remove this.
    7) Remove the Rubber grommet that sits inset into each of the legs.
    8) Remove the screws that removing the above grommet reveals.
    The back of the case is now held in place by clips around the whole Perimeter. Be very careful and patient and gently pry the two half's of the case apart. I did not have to use a plastic pry tool , as once it go started they just seems to "pop" off one by one, as I worked around. Its not that hard to do if you go easy..
    Then you can now see the hard disk , in a silver shield. Quite easy (but a bit fiddly) to replace.
    I replaced mine with a direct replacement 1TB hard disk that was a 3.25" but was only 20MM thick , as opposed to the more normal 25mm one. I am not 100% sure that a 25mm one would fit , but I think it may with a bit of fiddling around. But I was very aware of possible heat issues , so went for a direct replacement with the exact same model as Tosh has used.
    That's it really , I gave the fan and heat sink a good blow out with Dust off , but after 18 months use they were not to badly clogged..
    Please feel free to ask any questions , will gladly help if I can - which is a great deal more than Toshiba were willing to do lol. Will not be buying any of their products in future  , as I do expect a modicum of support for basic things like case opening.
    Attachments:
    SAM_2217.JPG ‏5045 KB

  • How to open my Satellite A75-S229

    HI! I'm trying to open my laptop toshiba satellite A75-S229, and i can't.
    Pleases help me to know how to open
    THANKS

    Hello Host
    Can you please tell us what problem you have with your notebook?
    I dont know what you want to do but if you dont have experience with notebook disassembling procedure it will be better leave it. Small mistake can damage the hardware and in this case you can have big problem. The construction is much sensible as on desktops.

  • How to open an HttpsURLConnection?

    Sorry to ask such a simple question. I am new to jsse and I would like to ask how to open and HttpsURLConnection. Any simple procedure outline or reference material are welcomed.
    Thank you very much~

    Hi ,
    URL u = new URL("https://urservername");
    HttpsURLConnection huc=(HttpsURLConnection)u.openConnection();
    For this u need to set system properties and JSSE support.
    IT will accept only https request.If u try for Http it wont work
    I hope this will help u
    Regards
    Sudha.K.Reddy

Maybe you are looking for

  • I`m getting a saffire pro 40,and want to know what and how to turn anything I dont`t need to have running on my 2011 Macbook Pro

    I plan to do some simple live recording ( 6 or 7 simultaneous tracks,and possibly add a few more later ) I want to keep my machine running smooth with the least amount of competition for resources while recording. Any tips and info on what and how to

  • File Sharing vs Internet connection

    Hi, I'm quite new to Macs, so please forgive me for spelling out overly basic information! I'm on a home network which has no access to the internet. Mine is an iMac, while the other 3 computers are Windows based. They are all connected via a wireles

  • View/modify catalog is inactive

    hello, I added an asset hours ago, and since then the option "view/modify catalog is inactive" is still not accessible. What am I missing? -- Nick

  • Oracle db with bean

    how can i use beans to do connection to oracle db,in jsp pages?

  • Acrobat question

    Last year I was having problems with retrieving my statements online from my bank because the .pdf file wouldn't generate. Somehow I managed to remedy the situation and had no problem launching them in Preview and I removed ALL traces of anything Acr