Need for a procedure with in, out, in the settings - small example.

Hi Master,

Need an little example with 3 parameters in a procedure. How to know call by value, by reference with out and inout parameters.

create or replace procedure is sample (x number, are series, z in number)

Start

pass the value of x in y and z as well. and the 3 display values.   Code required...

end;

Many thanks in adv.

AR


Need an little example with 3 parameters in a procedure. How to know call by value, by reference with out and inout parameters.

create or replace procedure is sample (x number, are series, z in number)

Start

pass the value of x in y and z as well. and the 3 display values.   Code required...

end;

Code required? This is NOT a coding service. This is a forum to help people with their questions on SQl, PL/SQL, or problems they have with the code THEY have written.

See the doc of the PL/SQL language - he has examples of use of these three methods of parameter.

Tags: Database

Similar Questions

  • I have all the Adobe Creative Suite with all the programs installed on my mac, I bought a new mac and go to sell the need for others, but I have to get the programs on the new computer and I also lost the serial number for it, what can I do about it?

    I have all the Adobe Creative Suite with all the programs installed on my mac, I bought a new mac and go to sell the need for others, but I have to get the programs on the new computer and I also lost the serial number for it, what can I do about it?

    Find the serial number of your Adobe product quickly

  • Call the PL/SQL procedure with in out parameter of OIC clob

    Hello

    For a few days, I am facing a problem. I have to call the pl/sql procedure with colb parameter out. I use c ++ and OIC (don't ask me why :)).

    I use a pl/sql problem test procedure:

    create or replace function Test (longField outside clob) return number is
    Number of result;
    Start
    longField: = 'prefix ';
    Result: = 12;
    Return (result);
    end Test;

    So I do all the stuff with the connection to the DB,

    I prepare the statement: "start: res: = test(:param); end; »
    So I OCIHandleAlloc (m_pCtx-> hpEnv,
    (void *) & m_hpStatement,.
    OCI_HTYPE_STMT,
    0,
    (NULL);
    and
    OCIStmtPrepare (m_hpStatement,
    m_pCtx-> hpErr,
    (...),
    (...),
    OCI_NTV_SYNTAX,
    OCI_DEFAULT);

    Before the binding I prepare parameters. For a clob I devote to the lob Locator:

    OCIDescriptorAlloc ((dvoid *) m_pCtx-> hpEnv, (dvoid *) & m_pLobLocator,)
    (ub4) OCI_DTYPE_LOB (size_t) 0, (dvoid *) 0);
    OCILobEnableBuffering (m_pCtx-> hpContext, m_pCtx-> hpErr, (OCILobLocator *) m_pLobLocator);

    that I bind parameters using OCIBindByName and OCIStmtExecute statement execution.

    I get an error
    ---------------------------
    Microsoft Visual C++
    ---------------------------
    Unhandled exception in... (ORAOCIEI11. (DLL): 0xC0000005: Access Violation.

    My question is: is it possible to call the pl/sql procedure with parameter BEAK clob?
    If Yes, what steps I need to do to succeed?

    Thank you for your response.

    Hello

    Of course, it is possible :)

    Show that you are your piece of code that is binding.
    Are you sure you had correctly the lob descriptor in the call to bind?

  • Reference for old 'procedures using IN OUT' wire

    Hello...

    Already this issue raised in this case.

    Due to a lot of confusion and apply different things... so, I'm starting a new thread here.

    This is NOT a duplicate thread. the two goal is different.    


    MY old thread: https://forums.Oracle.com/message/11133790#11133790

    > > MY emp table details > >

    SQL > desc emp;

    Name                                      Null?    Type

    ----------------------------------------- -------- ----------------------------

    EID                                                   NUMBER

    ENAME VARCHAR2 (15)

    VARCHAR2 (15) EQUAL

    NUMBER OF ESALARY

    ECITY VARCHAR2 (15)

    EPERK                                               NUMBER

    NUMBER OF ECONTACT_NO


    SQL > select * from emp;

    ENAME EID EQUAL ECITY ESALARY EPERK ECONTACT_NO

    ---------  ---------------  ------------  - ---------- ----------  ------------       -----------

    1 sona mba 10000 mumbai 9994488410

    Maya 2 mca 15000 calcutta 9994716872

    > > Program update salary using the procedure parameter and it's > >


    1 CREATE or REPLACE procedure emp_details

    2 (id IN emp.eid%type,

    pay 3 IN OUT emp.esalary%type) IS

    number of tmp_sal 4;

    5 BEGIN

    6. Select esalary in the tmp_sal of the emp where eid = id;

    7 if tmp_sal between 10000 and 20000 THEN

    8 salary: = tmp_sal * 1.2;

    9 tmp_sal between 20001 and 29999 ElseIf THEN

    10 salary: = tmp_sal * 1.8;

    11 ElseIf tmp_sal > 30000 then

    salary 12: = tmp_sal * 2.0;

    13 END IF;

    14 END IF;

    15 END IF;

    16 * END;

    SQL > /.

    Created procedure.

    > > what I really expect > >

    Already the table emp Esalary column ;

    If I run the procedure, it should be to update all records in PEM according to my State.

    "Already, I did same procedure with cursors. but now my requirement must be done with the "PROCEDURE arguments and Committee.


    This is what I got after the exit is not my GOAL > >

    ------------------------------------------------------------------------------

    1 DECLARE

    2 number of l_empno: = 1;

    3 number of l_sal: = 10000;

    4 start

    5 emp_details (l_empno, l_sal);

    6 DBMS_OUTPUT. Put_line(l_empno || l_sal);

    7 * END;

    SQL > /.

    112000 (bad output)


    PL/SQL procedure successfully completed.

    My questions are: If I go from '1' esalary sona record will be updated.  [only with procedure]  

    -C' is what I expect...

    Please note: if I finished successfully, I can even apply logic on column eperk

    Thanks in advance!

    Hello

    8f953842-815B-4D8C-833d-f2a3dd51e602 wrote:

    Hello...

    Already this issue raised in this case.

    Due to a lot of confusion and apply different things... so, I'm starting a new thread here.

    This is NOT a duplicate thread. the two goal is different.   


    MY old thread: https://forums.Oracle.com/message/11133790#11133790

    > MY emp table details >

    SQL > desc emp;

    Name                                      Null?    Type

    ----------------------------------------- -------- ----------------------------

    EID                                                  NUMBER

    ENAME VARCHAR2 (15)

    VARCHAR2 (15) EQUAL

    NUMBER OF ESALARY

    ECITY VARCHAR2 (15)

    EPERK                                              NUMBER

    NUMBER OF ECONTACT_NO

    SQL > select * from emp;

    ENAME EID EQUAL ECITY ESALARY EPERK ECONTACT_NO

    ---------  ---------------  ------------  - ---------- ----------  ------------      -----------

    1 sona mba 10000 mumbai 9994488410

    Maya 2 mca 15000 calcutta 9994716872

    Whenever you have a question, post a complete test script so that people who want to help you can recreate the problem and test their ideas. Include CREATE TABLE and INSERT statements for all necessary tables as well as outcomes from these data. In the case of a DML (UPDATE), for example, the sample data should show what looks like the tables before the DML, and the results will be the content of the or the tables changed after the DML. Explain, using specific examples, how you get these results from these data. Always say what version of Oracle you are using (for example, 11.2.0.2.0). See the FAQ forum: https://forums.oracle.com/message/9362002

    > Program update salary using the procedure parameter and it's >

    1 CREATE or REPLACE procedure emp_details

    2 (id IN emp.eid%type,

    pay 3 IN OUT emp.esalary%type) IS

    number of tmp_sal 4;

    5 BEGIN

    6. Select esalary in the tmp_sal of the emp where eid = id;

    7 if tmp_sal between 10000 and 20000 THEN

    8 salary: = tmp_sal * 1.2;

    9 tmp_sal between 20001 and 29999 ElseIf THEN

    10 salary: = tmp_sal * 1.8;

    11 ElseIf tmp_sal > 30000 then

    salary 12: = tmp_sal * 2.0;

    13 END IF;

    14 END IF;

    15 END IF;

    16 * END;

    SQL > /.

    Created procedure.

    > what I really expect >

    Already the table emp Esalary column ;

    If I run the procedure, it should be to update all records in PEM according to my State.

    You seem to be contradicting yourself. Do you want all lines updated, or you only want to update the lines meet him your condition 'eid = id "? If you want to update the table, use an UPDATE statement.

    "Already, I did same procedure with cursors. but now my requirement must be done with the "PROCEDURE arguments and Committee.

    This is what I got after the exit is not my GOAL >

    ------------------------------------------------------------------------------

    1 DECLARE

    2 number of l_empno: = 1;

    3 number of l_sal: = 10000;

    4 start

    5 emp_details (l_empno, l_sal);

    6 DBMS_OUTPUT. Put_line(l_empno || l_sal);

    7 * END;

    SQL > /.

    112000 (bad output)

    What is bad about it? What is the result you want to see?  Explain how you get this result.

    PL/SQL procedure successfully completed.

    My questions are: if I pass '1' esalary sona record will be updated.  [only with procedure]

    -C' is what I expect...

    Please note: if I finished successfully, I can even apply logic on column eperk

    Thanks in advance!

    If you really want to update the value in the table, you can do it like this:

    CREATE or REPLACE procedure emp_details

    (id IN emp.eid%TYPE

    ) IS

    BEGIN

    UPDATE emp

    SET esalary = esalary * CASE

    WHEN esalary<=>

    THEN 1.2

    WHEN esalary<=>

    THEN 1.8

    OF OTHER 2.0

    END

    WHERE eid = id

    AND esalary > = 10000;

    END;

    /

    If you want the procedure to switch to return the new value of the column esalary eid is unique, you can add 2 lines to the above procedure:

    CREATE or REPLACE procedure Emp_details

    (id IN emp.eid%TYPE

    salary OF THE emp.esalary%type--1ere line added

    ) IS

    BEGIN

    UPDATE emp

    SET esalary = esalary * CASE

    WHEN esalary<=>

    THEN 1.2

    WHEN esalary<=>

    THEN 1.8

    OF OTHER 2.0

    END

    WHERE eid = id

    AND esalary > = 10000

    RETURN esalary INTO wages;      -2nd line added

    END;

    /

  • Error running on the SIMS 2 and need for Speed Carbon with WIN7 Ultimate 32 bit


    • Error running with the SIMS 2
    • The error that says: the DVD error running is not found
    • I tried to fix it: with XP SP3, VISTA SP2 compatibility mode (I installed the game and I want to play with the compatibility mode for XP with Vista, now I installed WIN7Ultimate 32bits and it doesn't work
    • I already downloaded the latest patch and still work does not correctly...
    With the CNSA, I have the same problem, it starts, but when loads of information to start playing, it opens a window saying the program cannot continue to run, restart the application and the ini.

    Hi fedelovrin,

    Do you have any error message during the installation of the game?
    Is that your DVD player plays all DVDs correctly?
    Could you give us the exact error message that you meet?
    Is the same error message on Need For Speed Carbon?
     
    Since this game is compatible with windows 7, it should work properly without compatibility mode.
    http://www.Microsoft.com/Windows/compatibility/Windows-7/en-us/search.aspx?type=software&s=Sims%202
     
    Like you said you used the Windows XP on Windows Vista compatibility mode. Try to use under Windows 7 XP mode also and check.
    You can find more information on compatibility modes in the articles below:
    http://Windows.Microsoft.com/en-us/Windows7/what-is-program-compatibility
    http://Windows.Microsoft.com/en-us/Windows7/make-older-programs-run-in-this-version-of-Windows
    http://Windows.Microsoft.com/en-us/Windows7/Program-Compatibility-Assistant-frequently-asked-questions
     
    Here is the link for the support of the SIMS 2:
    http://TheSims2.EA.com/help/index.php
     
    I hope this helps.

    Thank you, and in what concerns:
    Shekhar S - Microsoft technical support.

    Visit our Microsoft answers feedback Forum and let us know what you think.
    If this post can help solve your problem, please click the 'Mark as answer' or 'Useful' at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • Need for a procedure step by step on how to make a backup of files

    Hello. I am very new to back up. I of course I generated files and system files. What I need is a procedure step by step for backup

    I generated the files and system files on a DVD.

    Once on the DVD I need to know how to check what files are contained.

    How can I tell the system backup of the system files and personal files on a DVD?

    How can I then watch the DVD and see the names of the files?

    I tried. I see the compressed folders but can not see which are located in each folder. Can you kindly explain?

    Thank you very much.

    Original title: the backup files

    Hello

    Method 1:

    I suggest you to return the item and check if it helps:

    Back up your files

    http://Windows.Microsoft.com/en-us/Windows-Vista/back-up-your-files

    Back up your programs, files and system settings

    http://Windows.Microsoft.com/en-us/Windows-Vista/back-up-your-programs-system-settings-and-files

    I also suggest you to return the item and check if that helps:

    Methods to backup your files

    http://Windows.Microsoft.com/en-us/Windows-Vista/methods-for-backing-up-your-files

    See also:

    Back up and restore: frequently asked questions

    http://Windows.Microsoft.com/en-us/Windows-Vista/back-up-and-restore-frequently-asked-questions

  • Need for an AP with two antennas for omni antegrated

    Hello

    I need an Access Point with 2 Omni antennas integrated. The 1130G meets my needs?

    Thank you.

    The 1131AG built in omni antennas for 2.4 GHz and 5 GHz range. The 1131G built in omni antennas for 2.4 GHz.

  • Procedure with an infinite number of settings?

    Hello readers - good evening.
    I wonder how to create a procedure/function with several parameters.
    For example Oracle supplied function 'GREATEST', 'LESS '. I don't know if there is no limit on values how much we move to this, but for practical reasons, it is sufficient, if you want to spend 2 or 200.

    Have we not specify all the settings (by default NULL) at creation time? or is there a better way?

    Thank you
    Lherault

    Published by: viswapsp on December 20, 2010 20:53

    You can use the collection as a parameter
    For example:

    create function many_params(nc in sys.odcinumberlist)
    return number
    is
      ret number;
    begin
      select max(column_value) into ret from table(nc);
      return ret;
    end;
    /
    select many_params(sys.odcinumberlist(1,23,3,4,5,6)) from dual;
    

    Kind regards
    Sayan M.

    Published by: xtender on 21.12.2010 12:52

  • Need for a method to be called when the pop-up screen

    Hello

    I have a requirement in my application. I have a screen from which I'm moving to screen B. When I Pop the screen B, I need a method that must be called in the screen has. Looks same as onActivityResult() in Android.

    I am currently using onExpose(). But this method is called for all in the screen has. In the menu click or button also. Is there another way to do this?

    Help, please...

    You have two options I can think immediately, which do not have to change anything in screen B.

    (1) use pushModal when you call B screen.  The statement immediately after the pushModal will be executed as soon as B screen is popped.  In general, I try to avoid the modal screens, but in this case, it's probably what I would do.

    (2) set an indicator immediately before you tap screen B.  Test the flag in onExposed().  If the flag is not set, then the onExposed was called for another reason and you can ignore it.  If the flag is set, then turn him off and process you want, knowing that the screen that has been exposed as screen B jumped.

    Either should work for you.

  • Hello world! I try to print my indesign booklet in pdf format, however, is greyed out in the SETTINGS of the PRINTER to set the CUSTOM PAGES.

    Hi everyone! I try to print my indesign booklet in pdf format, however, I have the option to in the SETTINGS of the PRINTER to set the CUSTOM PAGES is grayed out. I already tried to use the Acrobat 9 PPD here: https://forums.adobe.com/message/5819369#5819369, but still it does not work. I chose the PostScript file and in the next menu, the new preset, I downloaded does not work. When I export to PDF, all my bleed, colour, cultures etc information is lost. What could I do it wrong? Help, please. I use Windows 10, Indesign CC.

    As mentioned, you don't do this correctly.

    (1) you ask your printer if it has specific requirements for a PDF file.

    (2) If you do not have this, choose export using Adobe PDF export.

    3) select from the list of presets, PDF/X-1a

    (4) in the subsequent dialog box tick Pages (not Spreads)

    (5) under the tab printers and bleeds, select Use background settings lost document.

    Pass the PDF file to the printer, as Bob mentioned that printers will make the taxation.

  • I have mac pro 3.1 and it is insufficient for what is his is. I need an internal card with more flexibility to the inputs and outputs as used in windows systems.

    A sound card internal Mac pro 3.1 what they do?

    And if yes where can buy one?

    I need more input and output it attach to my PA and recording, hardware as I do with a windows PC.

    The mac comes with a microphone and a single output with terrible impact when it is connected to my sound stuff.

    A few people responded to your post above. Might be better to explain what your needs are, rather than starting a new discussion here.

    http://www.Sweetwater.com/C703--PCI_Audio_Interfaces

  • 15 - ac063nr: drivers needed for 15-ac063nr with windows 7 Professional

    I bought a 15-ac063nr and installed Windows 7 Professional for the job. I can't seem to find the drivers needed to make the USB ports are working on it. Any help would be greatly appreciated.

    Hello:

    I don't see W7 USB driver you need on the page of the driver and support for your laptop.

    Download, unzip and run the file setup.exe from the link below and you should be all set...

    https://Downloadcenter.Intel.com/download/22824/USB-3-0-driver-Intel-USB-3-0-Extensible-host-controller-driver-for-Intel-8-9-100-series-and-C220-C610-chipset-family

  • Need for a versatile to pass data to the chart

    Hello

    I have a sub - vi that performs data analyses. I pulled out the results through a def type. I want that this type def to include data necessary to plot the results on a XY Chart.

    My problem is that the data will sometimes contain only 1 and sometimes multiple data series dear. or sometimes the output should be a cluster of two 1 d-tables, sometimes it must be an array of clusters. Is there a good way to do this?

    vs

    udka wrote:

    You can try using for loop with indexing enabled so you will come to know how much coulumns you have during execution and clusters and then indexing on so that you always have table of clusters.

    You are on the right track.  Just need a little before the loop to transpose the table (to properly make the indexing job) and remove the data from the x-axis.

  • you need to take sd card and out before the iconia 810 a1 recognizes the card

    I have a problem with my verbatim microsd 32 GB class10.

    After that I turned the Tablet the sd card is not recognized.

    I need to go out and establish new, and then the Tablet recognizes the card sc.

    It is in the fat32 format.

    I tested with a 16g (don't know class) and there is no problem at all, the sd cards is recognized after the Tablet is running.

    anyone having the same problems is a good idea for me to try?

    cordially Torben5247

    Tablets have often problems with different brands of SD card, more reliable that I found are San Disk and Kingston. Suggest you load the card to your computer, save anything on this subject, just in case, and 'My Computer', check the map to find errors, fix all found and try again.

  • Unique pages for printing come with overlapping images on the previous page?

    I'm new in Indesign. I finished a magazine of 192 Pages in Indesign CS5 when I export to PDF into single pages, I get a piece of the previous page always showing on the following pages. This is for the entire document. As if they are overlapped. What I am doing wrong?

    When you say color, do you mean CMYK, or other space as LRGB?

    I ALWAYS provide benchmarks of crop for any file that has bleed, even though I know that the RIP will remove and put in new. There is no doubt about the place where to cut if show you it.

    And what do you mean by complete darkness? Do you have shades before you could really wanted? have you replaced a black K only for a 4 color 'black '? What sort of things did you do that?

    A color space not authorized error means the preflight check is to look for a space of colors you want, CMYK, RGB, Lab, grayscale or Spot. The default profile doesn't look like this, so you should use a profile, and maybe this isn't what you want, so you must click on the drop down menu of upstream and go Control Panel to define Profiules and check it out. To share, 100 + mistakes of color usually indicates that your images are RGB and you have it reported as not allowed. Is NOT a fatal error, as long as you either convert to CMYK in the course of export or use of the PDF/X-4 preset that leaves the color unchanged, integrates their profiles and output mode, so the conversion is possible in the IP of the printer. You should check with the printer first, though, to make sure that thay can handle this.

Maybe you are looking for

  • How can I prevent apps to remember logins access/user name &amp; PW?

    We have 4 iPads for our patients to use. We want to allow users to connect to things like Netflix, DirecTV, etc.. But we do not want the patient login information to be saved. Is there a way to ensure that the downloaded applications do not save the

  • PROFIBUS in Labview 2011

    Hello I recently updated my Labview from 2010 to 2011. And then I tried to install the latest driver for Profibus (DF_PROFI_II_LV_1.36.2.zip) that I downloaded from (http://joule.ni.com/nidu/cds/view/p/id/2687/lang/en). Release date: 10/10/2011 Norma

  • acquisition system

    Hello, everyone. I use labview 8.2. I'm programming an acquisition system, which with 8 channels, both important channels is sound pressure lever and wind speed, I use a graph to display set as an attachment. The x axis are the speed of the wind, it

  • BlackBerry App, what is meant by 'Built for BlackBerry' apps?

    Greetings, When I reviewed the storefront in my Z10, there is an application called 'Built for BlackBerry' category What is c? I thought that all applications in the BlackBerry World' built for BlackBerry'. Thank you Shane.

  • How can I permanently get rid of the column "type" in Windows Explorer to optimize my preview of file space

    In order to maximize my preview of the file space, I want to get rid of the column "type". I can tell what kind of file it is. The only thing I need is the update and the file size. Everytime I open a window of Windows Explorer I go to display, add c