Check this code once, Is therea any remedy to this Script?

1 declare
2 i number(2):=1;
3 id number(2);
4 name varchar2(25);
5 begin
6 loop
7 id:=&id;
8 name:='&name';
9 insert into emp_ramu values(id,name);
10 i:=i+1;
11 exit when i>=5;
12 end loop;
13* end;
SQL> /
Enter value for id: 10
old 7: id:=&id;
new 7: id:=10;
Enter value for name: 20
old 8: name:='&name';
new 8: name:='20';
PL/SQL procedure successfully completed.
SQL> select * from emp_ramu;
ID NAME
10 20
10 20
10 20
10 20
This code asking me to supply the values for id and name only once, when i gave the values for id and name it is inserting 4 times (same values) into the table....Is there any way, so that this loop executes 4 times and asks us values four times?

Same problem as on thread How can We avoid Default Prompting for scanning Values into variables?
You're missing a fundamental fact that SQL*Plus and PL/SQL code does not mix.
A PL/SQL block is send to the Oracle server process servicing you. It is parsed and executed there.
Now this block contains SQL*Plus substitution variables - those one with the & sign. Before SQL*Plus transmits the block, it sees that there are these variables. It prompts you for the values. Then it substitutes the variables with the values - and submits this changed block of PL/SQL code to the server to execute.
At the PL/SQL engine side - it cannot deal with any non-PL/SQL code. It does not know SQL*Plus commands. Just as it does not know C/C++ or Delphi or Powerbuilder or whatever client command or language set being used.
Nor can that server process, potentially running on a server platform a 1000km away, on some weird operating system, hack across the network, into your PC and magically prompt you to enter some values for the next loop iteration.
Server code runs on the server (PL/SQL). Client code/commands on the client (SQL*Plus). Do not confuse or mix the two. Standard client-server principles applies.

Similar Messages

  • How can send emails over a eircom account i read some were this not possible is ther any fix for this as i am thinking of buying a ipad Air not much use if you can not send emails or answer them thanks

    I believe you can only look a your emails if you have a eircom email account and you can not send or answer them with a eircom account if this is so can anybody tell me if there is a fix for this problem or would i better off just useing another email account that will work with ipad Reason i ask is i am just about to buy a ipad air and if this is not possible to use my email address to send emails from my ipad i would be better off with my laptop Thanks Napster

    There are lot's of posts via a google search and it seems you certainly can set up your eircom account on your mailbox on iPad.  Read this thread link:
    https://discussions.apple.com/thread/4022610?tstart=0

  • My ipod nano 6th gen fell out of my pockey and the screen cracked badly, is there any coverage for this under warranty? I just bought it a month ago. If not what are the options for getting it fixed

    My ipod nano 6th gen fell out of my pocket and the screen cracked badly, is there any coverage for this under warranty? I just bought it a month ago. If not what are the options for getting it fixed? It is pretty frustrating, it fell from about 3 feet out of my pocket and now looks like it was beaten by a hammer.

    Debbie:
    deborahfromwindsor wrote:
    he advises restarting by inserting the OSX disc and pressing down the C button to reboot from there then selecting disk utility, hard disk and repair.... Does he mean me to hold down the C key on the alpha keyboard or the ctrl key?
    Should I just ask for my money back??? If it is a simple repair do I just literally push the disc in, push the power button and hold down the C button?
    That's where I would begin, too, with
    Repair Disk
    Insert Installer disk and Restart, holding down the "C" key until grey Apple appears.
    Go to Installer menu (Panther and earlier) or Utilities menu (Tiger) and launch Disk Utility.
    Select your HDD (manufacturer ID) in the left panel.
    Select First Aid in the Main panel.
    (Check S.M.A.R.TStatus of HDD at the bottom of right panel, and report if it saysanything but Verified)
    Click Repair Disk on the bottom right.
    If DU reports disk does not need repairs quit DU and restart.
    If DU reports errors Repair again and again until DU reports disk is repaired.
    If DU reports errors it cannot repair you will need touse autility like TechTool Pro,Drive Geniusor DiskWarrior
    First we need to determine if the issue you are experiencing with the computer is software or hardware based. Once we have gotten things sorted out there should be time enough to make you decision about keeping or returning it.
    cornelius

  • Have mac mini with thunderbolt monitor 1yr old, recently updated with new 10.0.2 from apple, now iMovie doesn't seem to support my Sony HDR-XR500 camera. Is there any help on this?

    Have mac mini with thunderbolt monitor 1yr old, recently updated with new 10.0.2 from apple, now iMovie doesn't seem to support my Sony HDR-XR500 camera. Is there any help on this?

    haha, so now i'm thinking. I'm learning the terminal as fast as i can but there are several lines of codes and commands in there that throws up red flags to me that i don't fully understand. It just looks fishy too me. It would be highly appreciated if someone could just check this out just to tell me that i don't need to worry about it. Or point me in the right direction. I just feel un easy about this. ha.

  • HT1212 So my phone is messed up and you can't do anything with the screen...in order for me to sink it to back up i have to enter the passcode because it had a lock on it...and i can't due to it being messed up...is there any way around this...

    So my phone is messed up and you can't do anything with the screen...in order for me to sink it to back up i have to enter the passcode because it had a lock on it...and i can't due to it being messed up...is there any way around this...

    See Here  >  http://support.apple.com/kb/HT1808
    You may need to try this More than Once...  Be sure to Follow ALL the Steps...
    Take your time... Pay particular attention to Steps 3 and 4.
    Make sure you have the Current Version of iTunes Installed on your computer
    iTunes free download from www.itunes.com/download
    After you have Recovered your Device...
    Re-Sync your Content or Restore from the most recent Backup...
    Restore from Backup  >  http://support.apple.com/kb/ht1766

  • HT204053 I have an iPhone 4S and when I try to add an iCloud account is gives me an error "Cannot Sign In, The maximum number of free accounts have been activated on this iPhone." Is there any way to deactivate an account?

    I have an iPhone 4S and when I try to add an iCloud account is gives me an error "Cannot Sign In, The maximum number of free accounts have been activated on this iPhone." Is there any way to deactivate an account? I have one for myself, one for my family and one for my work. I had all three on my iphone and then I deleted my work. I wanted to get my own person @me.com account. It wouldn't let me create it from my iphone, so I created it from my Macbook Pro. I am trying to add it to my iphone, but it keeps giving me that error. If there is a way I can deactivate my work one so I can use my @me.com personal account?

    Welcome to the Apple Community.
    Unfortunately once all the 3 iCloud accounts have been created on your mobile device, you cannot create any more regardless of what you do. You will need to re-use one of the accounts that you have already created or create your new account on another device or computer.
    You should however be able to add existing accounts to your device, are you sure you aren't trying to create on rather than simply use an existing one.

  • Since upgrading to mountain lion my iphone no longer wirelessly connects to my itunes via wi-fi... is there a remedy for this?  thanks

    since upgrading to mountain lion my iphone no longer wirelessly connects to my itunes via wi-fi... is there a remedy for this?  thanks

    I am also having the same problem since upgrading to mountain lion. The symptom is strange.
    If I connect my iPhone/iPad using cable first, uncheck and then check the wifi sync option, and then disconnect the cable, iTunes will still be able to see the devices through wifi. But if I restart my computer, it will fail again. And I am tired of repeating this exercise.
    Anyone has the same problem?

  • Why are HP printer cartridges country specific? Is there any way around this?

    I have just moved from the UK to Newfoundland, Canada and I have brought my HP PSC 1610 printer with me.  I was advised not to bring any cartridges with me because they would explode during the flight so I had to buy new cartridges upon arrival.
    I noticed that the cartridge numbers recommended for my printer were similar but not exactly the same but the (HP, etc.) websites I looked at did not mention that HP printer cartridges country specific.
    In the UK black cartridge is an HP338 (C8765EE).
    In Canada the websites told me that the black cartridge is a 94 (C8765WC).
    I ordered a 94 cartridge (which took an indordinate amount of time to be delivered) and when I installed it my printer would not accept it ("not intended for use in this printer" error message) even though it fit perfectly.  I looked at the packaging in greater detail and noticed that I had been sent a 94 (C8765WL) and I also noticed (in a very small font size) "for sale only in Latin America".
    My questions are therefore:
    1) Why are HP printer cartridges country specific?
    2) Is there any way around this?  Eg is there anything I can do to my printer/ laptop to tell it to accept this cartridge?
    3) Are 94/ C8765WL cartidges compatible with 94/ C8765WC cartirdges?  Ie did the supplier sell me something that couldn't be used even if I had a Canadian HP PSC 1610 printer?
    4) Can I return the cartridges to the supplier given that it is based in Canada, they delivered it to me in Canada and yet they sold me a product that says "for sale only in Latin America"?
    Thanks
    anenglishmaninsaintjohns

    You will need to Contact HP to request a "Regionalization Reset". There should not be any charge for this, it is covered as part of the cartridge warranty. You will need to have access to your computer and printer while on the line with HP. You will also need to have a set of cartridges for the new region, once the reset is complete cartridges from the original region will no longer work.  HP's web page on the subject is here.
    Bob Headrick,  HP Expert
    I am not an employee of HP, I am a volunteer posting here on my own time.
    If your problem is solved please click the "Accept as Solution" button ------------V
    If my answer was helpful please click the "Thumbs Up" to say "Thank You"--V

  • I am a student trying to purchase creative card with a maestro card but won't allow anything other than master card or visa, is there any way around this?

    I am a student trying to purchase creative cloud with a maestro card but won't allow anything other than master card or visa, is there any way around this?

    No, not that I know about... but you might check the credit card page to see if there is an option
    Change/Verify Account https://forums.adobe.com/thread/1465499 may help
    -Credit card https://helpx.adobe.com/utilities/credit-card.html

  • Encoding process isn't working properly while making the disk image (or DVD)in my iDVD program.   Is there a remedy for this?

    I've used Old Toad's suggestion and made a disk image first because the DVDs I've tried to produce show a few pictures in playback and then go white.  The slideshow works fine in the iDVD program, and in the initial rendering stage all seems o.k. until the encoding step.  Then, it processes 4 or 5 pictures, then goes blank but the music continues to be processed.  Is there a remedy for this (I know Apple has ditched the program and the optical drives.)  I deleted the project and tried making it over from scratch, but no luck.

    I am simply lookig for some help not an argument.  I am not an RF specialist however have setup a few wireless networks in my tenure at Wynn Resorts.  I fully agree that wireless networking is an art and a science however the powers that be in Network Land have toughted wireless networking is the easiest and quickest way to get two computers to talk with one another.  As I previously said I have already turned one (1) MBP in for this problem and Apple decided to replace it because they could not fix the problem with my particular MBP.  This MBP was running Leopard when the problems started
    I am having a hard time believeing that there are several other devicces in my home that depend on a wireless network to operate and my MBP is the only one having an issue.  I took this a step further and decided to see what would happen if I tried to connect wirelessly via Fusion.  In Windows 7 I am able to print and scan to my hearts content without any issues.  I am able to browse the internet as much as I want.  I close Fusion and try to connect to my printer via wireless and nothing.
    In order to get Apple to help do I need to get a Network Analyzer and capture packets when I have these problems?  Out of the 1000 + posts is there a consolidation of which answer is the best?  BTW I am accessing the internet via a wireless connection using Fusion and Windows 7.
    In response to Linc's comments, I will look at the router specifications however I did not qualify that these devices are not using the wireless connection at the same time.  Right now I would guess there are maybe two (2) or three (3) at the most that are actively transmitting / receiving information. --  Thanks

  • I recently upgraded from OS 10.5 on a PowerMac G5 to an early Intel Mac running 10.7.5. To my consternation, I now find that my scroll wheel operates backwards from what I'm used to. Did Apple make a change that caused that? Is there  any way around this?

    I recently upgraded from OS 10.5 on a PowerMac G5 to an early Intel Mac Pro running 10.7.5. To my consternation, I now find that my scroll wheel operates backwards from what I'm used to. Did Apple make a change that caused that? Is there  any way around this?

    Apple didn't make this easy, did they! When Lion first came out, I think that check box was under the Trackpad heading of the System Preferences, whether you actually had a trackpad or not. I take it there's nothing there, either?
    I plugged a plain ol' three button Logitech mouse into the iMac, and while the Mouse panel options did change some, the same check box for Move content in the direction of finger movement when scrolling or navigating was there.

  • I am having an iPad 4. I am not getting alerts while receiving any call in my ipad. Is there any solution for this?

    I am having an iPad 4. I am not getting alerts while receiving any call in my ipad. Is there any solution for this?

    Check your settings
    Settings>Notifications>FaceTime/Message>Alert Style

  • Hi, sometimes big images could not open with photoshop.ı can open with windows but cant open photoshop.if ı try to open i am seeing a white image.is there any answer for this problem please.

    hi, sometimes big images could not open with photoshop.ı can open with windows but cant open photoshop.if ı try to open i am seeing a white image.is there any answer for this problem please.

    Just to assist those who might help you with this, please give the exact version of Photoshop CS6 you are running, for instance CS6 13.0.1.3.
    I had already asked for that in my previous post, but I guess you didn't quite know what I was referencing when I typed "exact version".
    Sorry, I cannot help you myself because I don't deal with that kind of 3D images, don't use Windows, and in all frankness I'm not quite following your last post.
    Also please give the exact model of your graphics card, so they can check whether it is on the list of cards tested by Adobe.
    Thank you.

  • Would like to use an alarm clock.  I need the alarm clock to function from the sleep mode.  A review said that MAC products will not allow a program to wake up a Mac.  Is this correct ?  Are there any products in the Mac store what will function from the

    Would like to use an alarm clock.  I need the alarm clock to function from the sleep mode.  A review said that MAC products will not allow a program to wake up a Mac.  Is this correct ?  Are there any products in the Mac store what will function from the sleep mode ?  How do I check this out ?

    You can set times for your computer to turn on or wake from sleep in the Energy Saver system preference pane using the Schedule... button.

  • Keynote always asks to accept network connections-is there a remedy for this?

    Every time I launch Keynote, it asks if I want to accept network connections--kinda annoying.
    It is already set to allow all incoming connections but it still asks every time it's launched.
    Any remedy for this?

    In Keynote Preferences> Remote Panel, if you have Enable iPhone and iPod touch Remotes option checked, you will get this warning when you start Keynote. Turning off the option stops the warning from appearing the next time you open Keynote. This is also true if you are using the Remote.app on an iPad to link to an OSX version of Keynote. With the option in OSX Keynote 09 turned off, you can't use a remote such as an iPhone or iPad to run your presentation, so it is your choice: have remote linking and get the warning or turn off the capability and get no warning.

Maybe you are looking for