How to fix this? when input none to a sqlplus substitution parameter

a small program:
ACCEPT p_input PROMPT 'Please enter the number of top money makers: '
DECLARE
v_count NUMBER := &p_input;
BEGIN
DBMS_OUTPUT.PUT_LINE('This is only a short program for asking the question. ');
END;
-- To run the sql:
SQL> start quest
Please enter the number of top money makers:
-- When just hit Enter keyboard after the prompt, the following error message displays:
v_count NUMBER := ;
ERROR at line 3:
ORA-06550: line 3, column 21:
PLS-00103: Encountered the symbol ";" when expecting one of the following:
( - + case mod new not null <an identifier>
<a double-quoted delimited-identifier> <a bind variable> avg
count current exists max min prior sql stddev sum variance
execute forall merge time timestamp interval date
<a string literal with character set specification>
<a number> <a single-quoted SQL string> pipe
<an alternatively-quoted string literal with character set specification>
<an alternatively-quoted S

What did you want ? no value or 'null' value ?
If you want to manage the two possibilities, try something else like below :
SQL> ACCEPT p_input PROMPT 'Please enter the number of top money makers: '
Please enter the number of top money makers:
SQL> DECLARE
  2     v_count NUMBER := to_number(case when '&p_input'='null' then 0 else nvl('&p_input',0) end);
  3     BEGIN DBMS_OUTPUT.PUT_LINE('This is only a short program for asking the question. ');
  4  END;
  5  /
old   2:    v_count NUMBER := to_number(case when '&p_input'='null' then 0 else nvl('&p_input',0) en
new   2:    v_count NUMBER := to_number(case when ''='null' then 0 else nvl('',0) end);
PL/SQL procedure successfully completed.
SQL> Nicolas.

Similar Messages

  • Can somebody please tell me how to fix this. when i try to install appleworks this pops up  so please help me i need to get this on my mac

    can somebody please tell me how to fix this. when i try to install appleworks this pops up
    so please help me i need to get this on my mac

    AppleWorks is a very old application and requires Rosetta to run under recent systems.
    Lion does not include Rosetta.
    If you browse this forum you will find many posts on this issue.

  • Hi do someone now how to fix this "when i press Tab button on the keyboard the cursor don't move to the next string control"

    When i press Tab button on the keyboard the cursor don't move to the next password control. i have simple login dialog in web ui builder.
    When i run the vix i need to press two times Tab to move from username string control to the next password "password control" my Tab index for the username
    control is "1" and for the password is "2' and i try to use all of the 3 options for TabNavigation Local, Cycle and Once and noone work.
    Thanks

    I attached one simple example of the issue.
    Thanks for the Reply.
    Attachments:
    Login Dialog.zip ‏2 KB

  • When I try to use the internal hard drive as a scratch disk I get this error "unable to set scratch disk- the selected directory is on write protect or non-writable media.  Any ideas on how to fix this.  It only happens in fcp.

    When I try to use the internal hard drive as a scratch disk I get this error "unable to set scratch disk- the selected directory is on write protect or non-writable media.  Any ideas on how to fix this.  It only happens in fcp.

    By internal, I assume you're referring to your systems (boot) drive. Is it, by chance, a partitioned dive?
    Also…although many people successfully use their systems drives as scratch disks, over time you'll have better results using a dedicated drive for your media.
    Good luck.
    Russ

  • Having a MBPr late 2013 and having a sound problem the sound does not come tom the headphones even its all the way up and when i remove the headphones it docent come out the internal speaker either ? any idea how i fix this?

    the sound do not come out the headphones sometimes altho its all the way up in the setting and when i remove the headphones the sound doesnt come from the internal speaker either and only a reboot fixes the problem and thats annoying! any idea how tto fix this?

    Hello. I've been able to play sound without problems through headphones or external speakers to date - the output always switched to these automatically until today. Now, sound output continues through internal speakers even if I plug in headphones or external speakers.
    - I tested the headphones and speakers on other devices: they work fine.
    - When I plug in headphones or speakers into the audio output port (I have verified that I'm not using the input jack) the devices are not detected and are not listed under the output tab in system preferences-sound.
    I concluded from this that I probably had a problem with the audio port, so to test that I tried the following. I plugged a powered multi-USB device with ports for microphone line-in and headphone line-out into the USB port and switched it on. I verified that it was working by plugging a USB stick into the multi-USB device - this was recognised successfully, so the device was clearly working. I then plugged in headphones and speakers into the audio line-out on the multi USB device - but still no sound came through them (and tey were not listed among output devices) and the Mac continued using internal speakers.
    What should I do? Does the latter test suggest that the problem does not lie with the audio port, or is my test not conclusive? What would you advise?
    Many thanks indeed!
    NG

  • When updating to  itune 10.5 I get this error message ,older version of bonjour can not be removed, and older version of apple mobile support cannot be removed, any one know how to fix this.

    When updating to  itune 10.5 I get this error message ,older version of bonjour can not be removed, and older version of apple mobile support cannot be removed, any one know how to fix this.

    1) The older version of Bonjour can not be removed. Contact your technical support group.
    Unfortunately, this sort of trouble has gotten more complicated to deal with ever since Microsoft pulled the Windows Installer CleanUp utility from their Download Center on June 25. First we have to find a copy of the utility.
    Let's try Googling. (Best not to use Bing, I think.) Look for a working download site for at least version 3.0 of the Windows Installer CleanUp utility. After downloading the utility installer file (msicuu2.exe), scan the file for malware, just in case. (I use the free version of Malwarebytes AntiMalware to do single-file scans for that.)
    If the file is clean, to install the utility, doubleclick the msicuu2.exe file you've downloaded.
    Now run the utility ("Start > All Programs > Windows Install Clean Up"). In the list of programs that appears in CleanUp, select any Bonjour entries and click "Remove".
    Quit out of CleanUp, restart the PC and try installing iTunes again. Does the install go through properly now?
    (If you do find a clean download site for the correct version of CleanUp, please don't tell me where it is. Without wishing to sound paranoid (although I grant it does sound paranoid), there is a non-zero chance that posting links to download locations for the utility here at Discussions leads to that download location being shut down.)

  • Aperture 3.1.2 When exporting files to Finder is creating a folder for each file, that means export 200 files is creating 200 folders for each files. Does anyone knows how to fix this. Thanks

    Aperture 3.1.2 When exporting files to Finder is creating a folder for each file, that means export 200 files is creating 200 folders for each files. Does anyone knows how to fix this. Thanks

    No. This is NOT true. I've been battling with this for a couple hours.
    I choose Export>Versions
    choose
    Subfolder Format: Project Name
    no custom subfolder
    Name Format: Current Version Name.
    Aperture creates project folders for each image and names them Projects1, Projects2, Projects3 etc.
    To be sure, I have no project named Projects
    x
    This particular Aperture library has 16 projects. you can see in the screen grab it's created more than 30 folders
    If I uncheck the Subfolder, that is say NONE, I just get images and images and images, not in their project folders (of course, because I've said NONE, so why would it put them in project folders?)
    I just want to export the entire library and have the versions placed in folders named by the projects from which they came.... ez enough, no?

  • My iPhone 4 no longer connects to my car or alarm clock after a recent sync to my computer.  The message at I get when trying to. Connect is "this accessory is not optimized for the device" or something like that.  Anyone know how to fix this?

    My iPhone 4 no longer connects to my car or alarm clock after a recent sync to my computer.  The message at I get when trying to. Connect is "this accessory is not optimized for the device" or something like that.  Anyone know how to fix this?

    Hello there philp_69,
    If I understand correctly it sounds like your phone hasnt been recognized in iTunes on your PC since the last couple of updates. I would use the troubleshooting in the following article which will walk you through the steps one by one. 
    iPhone, iPad, or iPod touch not recognized in iTunes for Windows
    Thank you for using Apple Support Communities.
    All the very best,
    Sterling

  • Hi. I get the following message when trying to update or install an application: "impossible to connect to iTunes store". Does anyone know how to fix this? Thanks!

    Hi. I get the following message when trying to update or install an application: "impossible to connect to iTunes store". Does anyone know how to fix this? Thanks!

    Try updating your iTunes using an iTunesSetup.exe (or iTunes64Setup.exe) installer file downloaded from the Apple website:
    http://www.apple.com/itunes/download/

  • When I connect my Mac Mini 2011 with Lion to a TV via HDMI and an earphone cable is plugged in, it´s not possible to choose sound out via hdmi, as opposed to connection via minidisplay port. Anybody knows how to fix this?

    When I connect my Mac Mini 2011 with Lion to a TV via HDMI and an earphone cable is plugged in, it´s not possible to choose sound out via hdmi, as opposed to connection via the minidisplay port. Anybody knows how to fix this?

    Was just on the phone with Apple about this.
    The solution was as follows for me anyway...
    Go to your Finder
    Choose the Go Menu
    Choose Computer
    Choose your Macintosh Hard Drive
    Choose your "Library" Folder
    Choose the "Preferences" Folder
    There should be a folder called "Audio"
    Move that whole folder to the trash
    Empty the Trash
    Restart from the Apple Menu
    When you are back up and running;
         Choose System Preferences from the Apple Menu
         Choose Sound
          In the output tab you should now be able to make the HDMI "Sticky"
          Enjoy your sound over HDMI and no more dirty knees or broken backs unplugging the desktop speakers!
    Mac Mini 2011 2.5Ghz 8 GB of RAM - Planar 17" VGA via display port adapter and Samsung 26" LCD TV via HDMI

  • Hey when ever i download and install Itunes then i open it says error finding folder please re download and I tried a tons of times and it didn't work. Does anyone know how to fix this?

    Hey when ever i download and install Itunes then i open it says error finding folder please re download and I tried a tons of times and it didnt work. Does anyone know how to fix this?

    Hi Beege140,
    I have an article for you that will help you address this launch issue with iTunes:
    iTunes for Windows Vista, Windows 7, or Windows 8: Fix unexpected quits or launch issues
    http://support.apple.com/kb/TS1717
    Thanks for being a part of the Apple Support Communities!
    Cheers,
    Braden

  • When I try to download the latest version of iTunes on my iPod Classic I get the message that "iTunes has an invalid signature" and that "Content was blocked because it was not signed by a valid security certificate.  Anyone know how to fix this?

    When I try to download the latest version of iTunes from apple.com, I get the message "Content was blocked because it was not signed by a valid security certificate."When I open iTunes and try to download the latest version there, I get the message "iTunes has an invalid signature.  The download has been removed."  I have also gotten an Internet Script Error stating that an error has occured in Line 0, Char O and that "Access is denied to images.apple.com/global/scripts/lib/iepngfix.htc."  This problem has never occurred with earlier versions of ITunes.  Anyone know how to fix this problem? 

    Are you downloading iTunes form an Apple website or somewhere else? If the answer is somewhere else, try downloading it from Apple. Click on iTunes in the black menu bar above and go from there.
    Let us know what happens.

  • Every morning when I awaken my MacBook Pro, I come to find that my Safari browser has been closed. How to fix this? I don't want to lose anything I have possibly typed in a site that I have left to finish working on for later.

    Every morning when I "awaken" my MacBook Pro, I come to find that my Safari browser has been closed on it's own. How to fix this? I don't want to lose anything I have possibly typed in a site that I have left to finish working on for later. I checked system preferences and everything seems to be checked appropriately as well as for Safari's preferences.
    I am not sure what's going on, because Safari only just recently started doing this and I haven't downloaded anything, nothing out of my regular computer routine. As well, I upgraded to Mavericks when it came out and I have the last version of it too. I can't imagine that Safari would close simply because I don't have or want to upgrade to Yosemite. I am holding off on the upgrade for a bit, because I heard Final Cut Pro 7 can't be run on Yosemite. While I could partition my drive, I really don't want to. Mavericks is fine for right now :   )
    Okay sooooo...back to Safari...what the! Please help and thanks for any replies ahead of time!
    I Hope All Is Well In Your World :   )
    Nyna

    There's an Apple help page on the DNS problem - at http://support.apple.com/kb/TS3408
    The first thing to try is changing your DNS settings - and for that you need to open System Preferences, then the
    Network section.
    In Network - click  on Advanced - then the DNS tab
    under DNS servers - use the + button to enter two extra lines
    either these, from google dns
    8.8.8.8
    8.8.4.4
    or from OpenDNS
    208.67.222.222
    208.67.220.220
    then click OK & then 'Apply'
    You would need to do that seperately for the Cable (Ethernet) settings and Wireless (Airport)

  • Lightroom encountered an error when reading from its preview cache and needs to quit.  Says Lightromm will attempt to fix the problem the next time it launches, but on every re-launch I get the same message.  Any clue as to how to fix this problem?

    I recently updated my HP laptop's OS from WIndows8 to WIndows8.1.  When I went attempted to open Lightroom5 I got the following message:
    "Lightroom encountered an error when reading from its preview cache and needs to quit. "
    "Lightroom will attempt to fix the problem the next time it launches"
    Every time I relaunch I  get the same message.  I'd like to understand what might be causing the problem so I can remedy and get back to my photo editing. Any clue as to how to fix this problem would be greatly appreciated.
    JPM

    reset your preferences, Resetting (or 'Trashing') the Lightroom Preferences file - Lightroom Forums

  • Lightroom crashes at start up with the error message "Lightroom encountered an error when reading from its preview cache and needs to quit".  Please advise on how to fix this error.  Thanks

    Lightroom crashes at start up with the error message "Lightroom encountered an error when reading from its preview cache and needs to quit".  Please advise on how to fix this error.  Thanks

    You probably need to delete your preview cache.  See here  
    Why And How To Clear Your Lightroom Cache - Lightroom Fanatic
    Preference and other file locations in Lightroom 5

Maybe you are looking for

  • How do you use Find a Friend

    I have downloaded the application and attempted to add friends, which the application acknowledges, but the friend never receives the invite. Is there something on our phones that we must turn on, what have we missed? Any assistance would be greatly

  • Daily Depreciation

    Dear Experts, My client wants to calculate depreciation on daily basis i.e. for 360 or 365 days of a year and does not want to use period logic i.e. monthly. Now, I have a problem with configuring this requirement because in transaction AFAMP which a

  • How to tell what version of Acrobat or Reader was last used to save a PDF

    How can I tell what version of Acrobat or Reader was last used to save a PDF file? My users are using fillable forms from grants.gov. We want them to use Adobe Reader 8.1.3 to fill these forms, but some accidentally use the Pro version of Acrobat. Th

  • WRT54G always reseting and very slow speeds.

    I don't know whats going on, I have a WRT54G router thats completely up to date with the firmware and the such. I am connected to it via Ethernet cable, and only use the wireless part for my videogame stuff, so its not just the wireless network thats

  • Verity Search Error

    I just started a Verity search engine for a very large site, and have gotten the following error message a couple of times: There was a problem while attmpting to perform a search. Query has a parsing error. (-40) at com.verity.k2.K2Search.receive(Un