The Null value as the default value for an input to a stored procedure parameter

Hello

How can we set the default values with the NULL value for the parameter in a stored procedure.
create or replace procedure emp_proc ( p_test_input in varchar2
                                                    p_emp_id in number,
                                                    p_emp_name in varchar2,
                                                   p_manager_id in number )
as
  begin
   if ( upper ( p_test_input ) = 'I' )
   then
      insert into emp
      values      ( p_emp_id  ,p_emp_name ,p_Manager_id,sysdate );
   elsif ( upper ( p_test_input ) = 'D' )
   then
      delete from emp
      where       emp_id  = p_emp_id;
   else
      dbms_output.put_line
         ( 'Please input ''A'' for ADD or ''D'' Delete  EMPLOYEE'
         );
   end if;
end;
As described above if I want to delete only the functioning

I want to call this procedure without pass additional parameters.
 EXECUTE  emp_proc('D',1010);
Published by: Rede on May 28, 2010 12:21

Published by: Rede on May 28, 2010 12:22
create or replace procedure emp_proc ( p_test_input in varchar2,
                                                    p_emp_id in number,
                                                    p_emp_name in varchar2 default null,
                                                   p_manager_id in number default null )

Tags: Database

Similar Questions

  • NULL values for some elements of the XML reading tree

    I am confirming that I interpret correctly all the elements of a custom data XML structure defined by my application (the schema is completely under my control).  Some of the elements in my XML tree are read as NULL values, even if similar items are readind as expected.  I have checked some obvious things like misspelling the names of keys, but have not yet find the problem.  Anyone who has debugged similar questions - what else could cause this?

    Example XML:

    
        1.0.0.0
        1000
        MyAppsName
        
            
                1000
                userDefined
                StructName
            
        
    
    

    And extracted C++ w/comments at the end of each line about what I see (DataManager is my class of CRUD operations):

    In DataManager.hpp:

    QVariant mCustomDataStructsTopLevel;
    QVariantMap mCustomDataStructsTopLevelMap;
    

    In DataManager.cpp:

    mCustomDataStructsTopLevel = mXda.load(Utils::dataFilePath(customDataStructsFileName));  // XmlDataAccess; verified loading w/no errors
    mCustomDataStructsTopLevelMap = mCustomDataStructsTopLevel.toMap();
    
    qDebug() << "appName element value: " << mCustomDataStructsTopLevelMap["appName"]; // Outputs "MyAppsName" as expected
    qDebug() << "lastId element value: " << mCustomDataStructsTopLevelMap["lastId"]; // Outputs null (specifically: QVariant(, ) ) - this is NOT expected
    qDebug() << "appVersion element value: " << mCustomDataStructsTopLevelMap["appVersion"]; // Outputs null (specifically: QVariant(QString, "") )  - this is NOT expected
    

    OK, I got the feeling (and actually hoped) it was a silly mistake of face-palm on my part (compared to a problem of BB10 who had little chance of getting fixed).

    The problem is that I copy the structure of custom data from Starter to my Active dir to my data directory to first install but do not crush him on subsequent launches, as the copy in the data directory is what the user changes and relies on.  I was not a delete and reinstall on each of my iterations, so I wasn't really loading the modified versions of my XML I wanted--just, I was getting a day old stale version which was actually for the items I didn't expect NULL values for nulls.  DOH!

  • Don't define the default directory for virtual machines

    Use VMware Player 3, how can I set the default directory for the VMS to be opened or created?

    Concerning

    Marius

    Open the preferences of the user (on Windows, % APPDATA%\VMware\preferences.ini).

    You want to add OR change the following line:

    -prefvmx.defaultVMPath =

    If this key is not in the file, add it and the full path that you want as the default value, the value on the right side

    -prefvmx.defaultVMPath = "C:\Thanksgiving\Ate\Too\Much".

    Now that the player can create virtual machines, it would be nice to have the user interface to specify the default directory for put/get those VMs

  • How to set the default size for SWF published in Catalyst CS5.5

    I create a project of 800 * 600 pixels in Catalyst CS5.5 and published it as .swf.

    But when I open the .swf that is published, the default size is less than 800 * 600. I have to resize by myself.

    So is there any method I can set the default size for published .swf?

    Thank you guys! Best regards.

    Nick

    When you start the new Flash Catalyst project, you have the option to enable resizing

    This setting is enabled by default.

    If you need to change it later, you can go into edit > settings of the artboard.

    Now when you publish your project, the width and height will be there will substitute.

    As to manually file editting the HTML, there are 3 sets of tag that define the width and height of the project (to manage different browsers). You will need to adjust the values of each of these tag sets. You should just have to do if you cannot republish the file.

    Chris

  • Null values for DB2 are causing problems

    Hello
    I have another problem with the link to the database to DB2 on IBM iSeries Access for Linux 64-bit OEL5 with gateway database Oracle and unixODBC 2.2.14.
    DB link works. However, null values for DB2 are causing problems. "The columns Date null on db2 return a date ' 30.11.0002 ', and the columns of characters that are null return an error ORA-28528: heterogeneous Services data type conversion error.
    isql returns the correct results.

    How can I fix? May set some parameters for the conversion of the data on the entry door?

    Thank you.

    If the driver is not fully ODBC level 3 compliant and functions of the spleen, we are lost. But sometimes drivers ODBC level 3 compliant, but lack the correct implementation of 64-bit. In these cases, we can tell the gateway to use the 32-bit ODBC 3 standard adjustment level in the gateway init file:
    HS_FDS_SQLLEN_INTERPRETATION = 32

  • I want to change the default printer for Firefox how can I do this?

    When I choose to print in Firefox it uses my printer copier not my default printer. So how can I change the default printer for Firefox?

    In Firefox 'by default' is the last used printer. If you switch to a different printer, Firefox to remember that a new 'default' - unless you have disabled this setting in all: config. Print.save_print_settings

  • How can I change the default zoom for the new tab only?

    The new tab in Firefox 33 zoom is too high to see all 12 of my thumb nail. I changed it using ctrl - but the next time I opened a new tab, the zoom is 100%. How can I change the default zoom for the new tab only?

    I posted a style rule to shrink the tiles, which allows several of them on the page, but naturally reduces their legibility. You can experiment with the dimensions to find a look that works for you.

    https://userstyles.org/styles/106326/shrink-new-tab-thumbnails

    I use the Stylish extension to experiment because of its preview function that allows me to see the effect quickly. You can install it from the site of modules, then after restart of Firefox while searching for his "S" icon in the toolbar to manage Styles so you can edit and experiment.

    https://addons.Mozilla.org/firefox/addon/stylish/

  • How can I change the default language for the spell checker? -solved, somehow...

    As the previous thread was closed without a real resolution - https://support.mozilla.org/en-US/questions/941350?esab=a & s = & r = 0 & as = s

    I managed to solve this problem on my end by reinstalling just firefox using the location of the language of the dictionary by default that I wanted to leave here - http://www.mozilla.org/en-US/firefox/all/

    A shame that the main download page does not select the relevant location for you and still more for changing the default language for the spell checker built is so much kak. Well.

    Right-click web page

    • [x] check spelling

    Language > choose language for spell check...

  • I have wrong associated with a DLL block note as the default program for opening. Can I reset this?

    I have wrong associated with a DLL block note as the default program for opening.  Can someone tell me how to reset it?

    See: http://support.microsoft.com/kb/307859
    TaurArian [MVP] 2005-2010 - Update Services

  • How to change the default path for documents and settings

    How to change the default path for documents and settings

    I try to change in the registry, but the profile can create but error! had no choice to change the default path % lecteur_systeme % d: /.

    Hello

    I suggest you to download TweakUI, this could help you or get you headed in the right direction
    http://Windows.Microsoft.com/en-us/Windows/downloads/Windows-XP

    Also this KB could help as well:
    http://support.Microsoft.com/kb/236621

    It will be useful.

  • 'Environment of the user' Windows cannot load the user's profile, but you have logged on with the default profile for the system.

    Original title: the user environment

    After starting windows, on the Welcome screen, this message always comes.
    "User environment.
    Windows cannot load the user's profile, but you have logged on with the default profile for the system. DETAIL: Not enough memory is available to process this command.
    And all my files that I save before you shut down or restart my pc all the my sample files on the desktop, my documents disappear...

    Thanks... :)

    This is typical of a corrupted profile.  To recover, perform the following steps:

    "How to recover damaged Windows XP user profile"
      <>http://support.Microsoft.com/kb/555473 >

    Almost always, corrupt profiles are accompanied by damaged drive.  During recovery, run a disk check with the /r or /f on your computer option.

    "How to perform disk error in Windows XP check"
      <>http://support.Microsoft.com/kb/315265 >

    HTH,
    JW

  • Changing the default settings for printing in Office Picture Manager

    Anyone know how to change the default setting for printing in Office Picture Manager?

    I have a user who clams that when they try photo printing settings in Office Picture Manager has been configured to print bac2 and paper 4 x 6.  Now when it prints, it must use the drop-down list boxes to tell it to print from bac2 and paper 4 x 6.
    I changed the default settings of the printer to print from the bac2 and use paper 4 x 6, but they must still use the drop-down list boxes in Picture Manager.
    Thank you!

    Although I maded the changes to the properties of the Windows printer I had to do that to solve the problem.

    To solve the problem:

    1. once in the print of the image window there is a link 'Options '.... "at the bottom right.

    2. once it's a click a print settings window that opens there. You will need to click on the link 'printer properties '.

    3. now the printer Document Properties window appears. Change of Source paper and media here.

    4. click on the OK button and now it's good to go.

  • Change the default search for small native browser (Lollipop) engine

    It does not seem possible to change the default search for the small browser engine.  I would like to change from the current, Google, DuckDuckGo or similar.  Anyone know how?

    FYI: the 'small' browser is the first reached by pressing the button of the Application selector and selecting the browser available by default in the list of small applications at the foot of the screen.

    1. open the small browser
    2 menu
    3 settings
    4 Advanced
    5. set map search engine
    6. Select a different search engine

  • Change the default format for burning discs of this system active files in the ISO image format

    How can I change the default format for burning discs of this system of active files to ISO image format?  I don't want the active file as the default system and really don't want to have to choose what I want to use the default every time.  It's boring. I have Vista x 64 on my computer and have not yet adapted to all the changes in XP.

    Thanks, but it's not useful.  It is more that an 'improvement' Microsoft did that, as I fear, is a total and far failure to be an improvement.  It also means that I'll just use a 3rd party program to burn all my CD/DVDs.  You know if I wanted to be able to remove, reformat, etc.. CD/DVD I would use those rewritable.  That's why they exist.

  • Can't make the default program for PDF files Adobe Reader 9

    Hello. I have trouble changing the default program for the pdf files of Adobe Reader 9. Whenever I select the program, it does not appear. I'd appreciate any help. Thank you.

    Sorry to resurrect an old thread, but here is your solution:

    Regedit > HKEY_CLASSES_ROOT > Applications > AcroRd32.exe > shell > open > command

    Right click > edit

    Change your version to the latest version number:

    "C:\Program Files (x 86) \Adobe\Reader" '%1'--> ' C:\Program Files (x 86) \Adobe\Reader 10.0\Reader\AcroRd32.exe "'%1 '.

Maybe you are looking for

  • Point video freezing HTML5 player but audio is fine

    I'm using the latest stable version of Firefox, but it seems every time I play a video YouTube every few seconds the video will freeze and sometimes the icon of buffering, but audio continues on the property. I use the HTML5 player and he doesn't do

  • Problem to open the .jar file

    The question open on mac os x 10.11.5 .jar file. Everything was fine before. Java is updated?

  • Satellite Pro S300-ez2502 - sometimes touchpad stops resonding

    Hello I use Toshiba Satellite Pro S300-ez2502 with Windows Vista Business.Sometimes my touchpad doesn't work for a couple of seconds at least 1 time a day.It becomes a bit annoying, because the mouse pointer move by moving the finger on the touchpad.

  • Sampling rate 9172 OR cDAQ

    I am using a cDAQ 9172 with modules NI 9219, NI 9264 and three NI 9211.  I'm looking to acquire signals out of the acquisition of data within a loop under continuous sampling.  My program works fine if I set the number of samples to read 1-2 Hz, but

  • VXIplug &amp; play driver need VISA

    Dear all our need for screws to find "ke24xx.dll". I searched the internet and I got I need to install this driver: "Keithley 24xx VXIplug & play driver VISA." This diver is related to labview 7.1. can any body give me this driver? Thank you. Best re