How can i implement the default value for this variable?

In one of our Stored procs,we have a variable RECS_TO_DELETE, which determines the number of records to delete from various DELETEs that happen within this proc.
The value for RECS_TO_DELETE variable should be obtained from a configuration table sys_config
select
rec_num into RECS_TO_DELETE
from sys_config
where
sys_code=55;
But if something goes wrong with sys_config table or the above SELECT INTO, our client wants to makes sure that RECS_TO_DELETE should have a default value of 1000.
In the code, how will i implement having this default value of 1000 for RECS_TO_DELETE variable  in case the above SELECT INTO fails for some reason.

Hi,
You have to assign a value before the execution...
DECLARE
    RECS_TO_DELETE NUMBER(9) := 1000;
BEGIN
    SELECT rec_num
    INTO   RECS_TO_DELETE
    FROM   sys_config
    WHERE  sys_code = 55;
    DBMS_OUTPUT.put_line(RECS_TO_DELETE);
EXCEPTION
    WHEN NO_DATA_FOUND THEN
       DBMS_OUTPUT.put_line(RECS_TO_DELETE);
END;
/Regards,

Similar Messages

  • How can I get the default value of a particular preference programatically. I know I can see the default value for some of the preferences in about:config but, I need a programatic way to get the default value.

    <blockquote>Locked by Moderator as a duplicate/re-post.
    Please continue the discussion in this thread: [tiki-view_forum_thread.php?comments_parentId=702631&forumId=1]
    Thanks - c</blockquote>
    == Issue
    ==
    I have a problem with my bookmarks, cookies, history or settings
    == Description
    ==
    How can I get the default value of a particular preference in FireFox?.
    I know I can see the default value for some of the preferences in about:config but, I need a programatic way to get the default value.
    I see some that there are values for preferences in firefox.cs but I am not certain that these are being used as the default values for preferences. prefs.js in user's profile only has the updated values and not the default values.
    Any help towards acheiving this programtically is greatly appreciated.
    If the default values are stored in a file, kindly let me know the format in which it is stored for me to parse it programatically.
    == User Agent
    ==
    Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Win64; x64; Trident/4.0; .NET CLR 2.0.50727; SLCC2; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)

    Dear Friend,
    Here when you have the callableSattement as ?=proc(?), the first ? is an output parameter. So you should register it as out parameter using registeroutparameter.
    Then you can get the value from the outparameter using callablestatement.getXXX().
    Try that way.
    For free tral versions of JDBC Drivers go to www.Atinav.com

  • How can I change the default setting for downloading photos from email?

    How can I change the default setting for downloading photos from emails I receive?  It shows the default as Photoshop Elements 4.0 and is not supported by this system.  That was my last computer!!
    Thanks,
    Sheila

    That has nothing to do with styles nor Pages, it is a System/Printer Driver setting.
    You can experiment to see if the Printer Settings stick with your document, but in the past this has not worked.
    Peter

  • PDF SCANS ERROR MESSAGE: CAN'T "OPEN THE DEFAULT APP FOR THIS FILE TYPE" EG. PDF

    OFFICEJET PRO 8600 PLUS , WIN 7, SCAN TO COMPUTER AS A PDF FILE.  ERROR MESSAGE: "
     CAN'T "OPEN THE DEFAULT APP FOR THIS FILE TYPE" EG. PDF

    Hi @reddog2,
    I would contact HP Cloud Services for assistance. Call 1-855-785-2777.
    Have a nice day!
    Thank You.
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos Thumbs Up" on the right to say “Thanks” for helping!
    Gemini02
    I work on behalf of HP

  • How can I change the default application for a content type?

    Running a version of Linux, the default application for PDF files is "Use Document Viewer (default)", which appears to be /usr/bin/evince. I'd much prefer to use /usr/bin/okular; how can I change the default. This question is NOT about how to change the function that is automatically applied when I access a link, in this case "Preview in Firefox", but rather to the default application that I can select when I download a file being viewed in Firefox's previewer.

    This is real progress, a solution to the problem as posted. The command:
    xdg-mime default okularApplication_pdf.desktop application/pdf
    makes okular the default.
    However when I added okular to the choices for applications in:
    * Edit>Preferences>Applications>PDF
    the popup box that appears when I click Download on the preview page changed. The pulldown menu that appears next to "Open with" used to have 3 entries:
    # Document Viewer (default)
    # Acroread
    # Other
    Now it has only 2:
    # Okular (Default)
    # Other
    I'd like it to read
    # Okular (Default)
    # Acroread
    # Other
    How can I control the entries in this pulldown list?
    Also, how can I make the default choice in the popup box be
    * Open With <whatever> , rather than
    * Save File ?

  • How can I change the default value of a command ?

    I want to be able to change the default value of a comand when the vi
    is running. (I know how to do that with a right click when the vi is
    not running).
    In fact I would like the user of the vi to be able to choose a new default value for a command.
    How can I do that ?

    You can't do this on a running VI. If you have an idle VI, you can open a reference to that VI and use an invoke node with the Make Current Values Default method, but that will only work in LV (i.e. not in an EXE) and will affect all the controls. What you can do is save the values to a file and load them when the program starts. OpenG's File I/O package includes some VIs which will help you with that.
    Try to take over the world!

  • How can I change the default page for a book?

    I have a book that contains six pages. One of the pages contains the login portlet while the others contain account specific information that a user can only see if they are logged in. Currently, I have the default page set to the login page.
    I am attempting to write a backing file for the book that will esentially change the default page for the book to be one of the other pages if the user is already logged in. In effect showing a logged in user their account summary page instead of the login portlet.
    I can't seem to find a way to change what page the user is shown with the book and page context classes. I can hide the login page, but this leaves the user looking at a blank page. Unfortunately I can't use entitlements, otherwise this would be easy.
    Does anyone know how to "forward" to another page from a backing file?
    Thanks,
    Sam
    Message was edited by:
    straubse

    Got it!
    In your backing file you'll need the following in your handlePostbackData method:
    BookBackingContext bookCtx = BookBackingContext.getBookBackingContext(arg0);
    bookCtx.setupPageChangeEvent("PageLabel");

  • How can I change the default program for the external applications editor?

    I have read the on line directions for this and it reads "select a file type in the left pane."   I do not see where this is in the left pane.  All I see in the left pane is "Browser start pages" and a "How do I " Pane.  Nothing with file types.

    Hello,
    Welcome to Adobe Forums.
    In order to change the default program for the external applications editor. Please follow the steps as mentioned below.
    Click on Edit menu then choose preferences.
    Once the preferences dialog box open.
    click on file editors.
    On the Left pane you will find all the file types which you want to edit .
    On the right hand side you will find the editors for that specific file type.
    If you want to add any other application you need to click on + symbol at the top of right pane.
    Select the path of that application which you want to apply.
    clcik on open.
    If you want to make it primay you can click make primary option available at the right hand top. For more detials please check the screenshot below.
    Regards,
    Rajeev

  • How can I edit the default settings for the Email button?

    I saw this question posted for February and as yet still unanswered. So I am now asking it again.
    I do not want to use my .mac account email address in my website. I want it linked to my domain. I have found no specific instructions for changing the default. Also my drag down "Link to" menu in the Inspector does not work.
    Thanks........
    eMac   Mac OS X (10.3.9)  
    eMac   Mac OS X (10.3.9)  

    While you can't edit the default email address in iWeb, there is a workaround which may suit.
    In Safari, locate a web page which has iWeb's email button on it (if you've already published a site, one of your own web pages is ideal). Control-click on the button and select 'Add Image to iPhoto Library'. Drag this image from the Media Browser to your iWeb page, select the image, and use the Link inspector to enable it as a hyperlink linking to 'An Email Message'. Enter whatever email address you like in the To box and a Subject for the message if you wish.
    To make things easier, create an iWeb library in iPhoto and add the email button to it for handy access.
    [ Visit here for iWeb Tips, Tricks and Hacks ]

  • How can I change the default value in IT0009?

    Right now in our system when we create a new IT0009 entry, several fields are defaulted such as the payee name, bank country, and currency (field WAERS). But in table T588Z I can not find anything defined for IT0009. Now even I create entries in T588Z ex. as 
    0009              WAERS     06     10     W     P0009-WAERS='USDN'
    the currency still shows up as 'USD' when I create a new record. Can anyone tell me where the field 'WAERS' is defaulted as 'USD' and how can I control this?
    Thank you very much.
    Best regards,
    Johnson

    Hi Johnson,
    Correct me if I am wrong,You need to default a value, so i guees you would need to use the feature P0009 not the dynamic action. If you could let meknow the current structure of the p0009 feature, may b i could help you figure the could-be structure of the p0009 to default the required value.

  • How can I select the default greeting for a voicemail for the iPhone 4s?

    I am wanting to set up the voicemail feature for my iPhone 4s. (I have had this phone for years but never enacted a voicemail!) However, I am having trouble. When I click on the phone settings in my phone, the only options I have in regards to voicemail is to set up or change the password. I am not given the option to set up a voicemail. Whenever I try to set up the voicemail by dialing *86, I am given only the options of changing my password or to set up a custom greeting. I am not able to select the default/standard greeting as it is not mentioned. I am wondering how I can go about this. I am not sure why I don't have the options already available in my phone automatically or why it is not provided as an option when I call to set it up.
    Any help with this?
    Thank you!!

    nnd217, Help is here! The 4S is a great device, sorry to learn that you are having trouble with setting up the VM default greeting. I should be able to shed some light on this situation. If you go to your phone icon, as if you were making a call, you should see the voicemail icon down at the bottom right. Once you select that, in the upper left corner there is an option that says Greeting, so ahead and select that. From there you have two choices, default and Customer. If you select default there will be a check mark in that box, then hit save. You should now have your default greeting in place. If you do not have that or continue to have issues with it, please let me know! Thanks!  ErinW_VZW Follow us on Twitter @VZWSupport If my response answered your question please click the "Correct Answer" button under my response. This ensures others can benefit from our conversation. Thanks in advance for your help with this!!

  • How can I change the default font for the Text Tool in CS5?

    Does anyone know of a SIMPLE way to change the default font in CS 5. I can't believe how difficult Adobe makes this. I have spent numerous time on the internet trying to solve this problem. Any help would be greatly appreciated. Thank you

    Thanks Charles, I'm not sure where preferences are, I wish photoshop would
    look at this, there should be a simple way to set font preferences. Perhaps
    CS 7 will offer a solution. Thanks for your help
    On Thu, Nov 29, 2012 at 3:08 PM, charles badland

  • How can I change the default number for a contact when using Siri

    My husband has one mobile for work, one for home, both are in my favorites. When i'd ask Siri to dial his number, it would always ask me which one to use. Recently when calling him Siri asked if I would like to use his work number as the default and I mistakenly agreed. Now Siri never asks which number to dial and always dials the work number. How can I change that? I would like to make the default the home number.

    Thanks all for your responses.
    I tried to "order" Siri to change my husband's default number and whatever syntax I used for my request Siri responded with a web search on how to set favorites.
    So I ended up deleting the work number from my husband's contact information and I used Siri to call him a couple of times. After 24 hours (random time frame) I added his work mobile back to his contact information, but not in the favorites.
    SIri now dials his home number because it's the only one in the favorites.
    I'll add it to the favorites in due course.

  • How can I change the default alarm for events in ical?

    How to change default alarm

    I've been curious about this issue as well. I think it would be nice if there were more options to select the default alarm... from within the preferences themselves. Even being able to choose how many days before vs. always figuring out how many minutes are in multiple days.
    While someone has found a method for changing the sound to accompany messages, users are still not able to select the type. I prefer message only (no sound), although I supposed this is the same as the current default minus any sound. I tried blank and "" entries for 'Default alarm sound' in the .plist file with no success (blank reverts back to Basso, and "" just didn't work).
    I wonder if there are some other items that could be listed in the .plist file to offer more choices such as "Default alarm type". Is there a way to figure out what key variables/values iCal uses for? Someone must have figured out that iCal will look in the .plist file for a 'default sound value'. I'm guessing that there are more of these values that could be set by the user.
    A similar question - it would be nice to be able to set the default alarm time for all-day events. I suppose it doesn't matter all that much since 11:45pm probably means I'll just get the message the next morning; I still guess I'd prefer something like 8am though.
    Forgive the novel...
    -John

  • How can i pass the one value for two bind parameters

    hi All,
    i have a search Query
    select Distinct CONSOLIDATION_SUMMARY_ID,CREATION_DATE,CREATED_BY,BATCH_ID,PROCESS_FLAG,ERROR_MESSAGE,CUSTOMER_ID,BILLING_FREQUENCY
    ,CONSOLIDATION_LEVEL,SOLD_TO_ORG_ID ,SHIP_TO_ORG_ID ,TRANSACTIONAL_CURR_CODE ,INVOICE_TO_ORG_ID ,PRICE_LIST_ID
    ,ORIG_SYS_DOCUMENT_REF,INVENTORY_ITEM_ID ,ORGANIZATION_ID ,ORDERED_ITEM ,ORDERED_QUANTITY ,UNIT_LIST_PRICE
    ,UNIT_SEELING_PRICE,ORDER_QUANTITY_UOM,ORDER_NUMBER ,ORDER_DATE ,INVOICE_NUMBER ,INVOICE_DATE
    ,FEE_CALCULATION_WORKSHEET_PDF ,TRADE_DETAILS_PDF ,INVOICE_REPORT_PDF ,PRICING_ATTRIBUTE_CONTEXT
    ,PRICING_ATTRIBUTE ,PRICING_ATTR_VALUE_FROM
    from xxcurrnx.xxcur_trade_consol_summary XXSTR
    WHERE XXSTR.BATCH_ID=NVL(:1,XXSTR.BATCH_ID)
    and XXSTR.CUSTOMER_ID=nvl(:2,XXSTR.CUSTOMER_ID)
    But i need to pass only one value to this query: throw the below code
    public void passTocusttrxn(String vcustid)
    System.out.println("The customer id in trxn vo:"+vcustid);
    XxcurtradeconsummaryVOImpl vOrdnumb=getXxcurtradeconsummaryVO1();
    vOrdnumb.setWhereClauseParam(0,vcustid);
    vOrdnumb.setWhereClauseParam(1,null);
    vOrdnumb.executeQuery();
    System.out.println("The executed query After is :"+vOrdnumb.getQuery());
    But it throws the below exception.
    java.sql.SQLException: Missing IN or OUT parameter at index:: 1
    could you please tell me how can i achieve this.
    Thanks,

    hi Meher,
    i need to pass this value throug the Spell Parameter.
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processRequest(pageContext, webBean);
    XxcustdtlsmainAMImpl am=(XxcustdtlsmainAMImpl)pageContext.getApplicationModule(webBean);
    if(pageContext.getParameter("PCustID")!=null) // PCustID is the Spell parameter here
    if(pageContext.getParameter("PbtchID")!=null)
    if(pageContext.getParameter("PordNum")!=null)
    String vcustID=pageContext.getParameter("PCustID");
    String vOrdNum=pageContext.getParameter("PordNum");
    System.out.println("The cust id in PR:"+vcustID);
    System.out.println("The cust id in PR:"+vOrdNum);
    am.passTocustlinetrxn(vcustID);
    how this vcustID value will passed to the search Code.
    if(pageContext.getParameter("BatchID")!=null && !pageContext.getParameter("BatchID").equals(""))
    String BchID=pageContext.getParameter("BatchID");
    int vInBtchID=Integer.parseInt(BchID);
    srchVO.setWhereClauseParams(null);
    srchVO.setWhereClauseParam(0,vInBtchID);
    System.out.println("The Batch ID is :"+vInBtchID);
    f=1;
    }else
    srchVO.setWhereClauseParam(0,null);
    if(pageContext.getParameter("CustmeCode")!=null && !pageContext.getParameter("CustmeCode").equals(""))
    System.out.println("i am im customer code ");
    String vCustID=pageContext.getParameter("CustmeCode");
    srchVO.setWhereClauseParams(null);
    srchVO.setWhereClauseParam(1,vCustID);
    System.out.println("The customer code is "+vCustID);
    f=1;
    }else
    srchVO.setWhereClauseParam(1,null);
    if(f==1)
    srchVO.executeQuery();
    Regards,

Maybe you are looking for

  • Best back up for Mac Book Pro

    Hi Guys, Having recently made the big step of purchasing a MacBook Pro I am all over the moon about it (really not sure why I hesitated for such along time). I don't want this to become a nightmare of losing some of my data etc. and wanna get a good

  • Whats a Backlight, and How Can i fix it.?

    i went to apple and they said my backlight went out ..my screen is Totally blank still.. my brother want to buy me a new screen would that fix my problem

  • Lucene Bottom N type report

    I have a requirement to write a report which shows the least occurances of some events. I have found example of Top N type reports, but is it possible to reverse the order to get Bottom N report in lucene? For Top N we have following: GROUP BY $P{Eve

  • Best corded optical mouse for 20$ and under ?

    I am going to start looking for a new corded optical mouse before long. There's nothing wrong with mine but i want one in reserve just in case considering its two years old and still going strong. I see a lot and  I mean a lot of corded mice, most ar

  • TS1315 My camera is not opening to take a picture

    My camera is not opening,and unable to take apic