How to suppy and get the results from a procedure dynamically.

Hi all,
I have a simple procedure, which should prompt five times for
values and display the values dynamically. but it is not
behaving like that. while compilation it is asking for the
value, once i enter the value , it is prompted that procedure
created. while executing, it is diplaying all five same values
what i have entered at compilation time. Please check out. Here
is the code.
create or replace procedure test is
t_var integer;
t_count integer := 0;
begin
loop
t_var := &r;
dbms_output.put_line('The value is: ' || t_var);
If t_count = 5 Then
     Exit;
End If;
t_count := t_count + 1;
end loop;
End;
Regards,
G. Rajakumar.

See now what happens is
When u use &variable in sql or plsql it tries to substitute with
the value held by that variable. If it dosent find that value in
that session then it prompts for one. (that is why ur proc asks
for value only once)
What happens in your proc is
fisrt time it will ask for &r value, but subsequent i will not
ask because when second time it tries to do &r in your prog it
finds the value that u had entered above. Also as u said that
prog takes the input and dosent show anything this is cos sql
engine takes the value and compiles the proc it actucally shows
when u run it. U can have look at the below executed program
In this once u have eneterd say value 199 then it display 199
for those many number of times. I hope this answers your
question.
SQL> ed
Wrote file afiedt.buf
1 create or replace procedure test is
2 t_var integer;
3 t_count integer := 0;
4 begin
5 loop
6 t_var := &r;
7 dbms_output.put_line('The value is: ' || t_var);
8 If t_count = 5 Then
9 Exit;
10 End If;
11 t_count := t_count + 1;
12 end loop;
13* End;
SQL> /
Enter value for r: 12
old 6: t_var := &r;
new 6: t_var := 12;
Procedure created.
SQL> exec test
The value is: 12
The value is: 12
The value is: 12
The value is: 12
The value is: 12
The value is: 12
PL/SQL procedure successfully completed.
SQL>

Similar Messages

  • How do I get iTunes 11 to work as the old iTunes did in this respect: after playing a song in one playlist, I click on another playlist, highlight a song, press play, and get the result of that song playing & that playlist continuing?

       How do I get iTunes 11 to work as the old iTunes did in this respect: after playing a song in one playlist, I click on another playlist, highlight a song, press play, and get the result of that song playing & that playlist continuing?  As it goes now, one clicks on the song in the new playlist where the arrow is and then chooses 'Play Song Next.'  So, it plays next, but then the song after that is back in the old playlist.  I want to use iTunes smoothly without the extra clicks I've had to do in order to get the playlist to continue.  This is music for background while I play the violin at restaurants, and extra clicks and hassle is quite unappreciated, especailly since it worked fine in the previous iTunes.
       Thanks.

    At the top of the playlist where it shows the playlist title and the number of songs, there are two icons. Click the "play" triangle to add the entire playlist to "Up Next", or the "shuffle" symbol to do the same thing but in random order. But the currently playing track will stop playing, and all the songs in "Up Next" will be removed (replaced by the ones from this playlist).
    If you hold down the "option" key while clicking those icons, the currently playing song will continue playing, and the new playlist will be added to "Up Next" (above the songs that were already there).

  • I bought a book on itunes on my pc. I want the book on my ipad.  When I plugged in my ipad to sync it moved all my apps to my pc - useless. how do i get my apps back on my ipad and get the book from my computer to my ipad?

    I bought a book on itunes on my pc. I want the book on my ipad.  When I plugged in my ipad to sync it moved all my apps to my pc - useless. how do i get my apps back on my ipad and get the book from my computer to my ipad?

    Instructions on syncing your iPad can be found here:
    http://support.apple.com/kb/PH12311
    and in the accompanying documents linked from that page. Syncing your iPad with iTunes copies items, it doesn't move them. The only way apps would be actually removed from your iPad during syncing is if you had iTunes set to remove them on syncing, so check the appropriate settings in iTunes, set the book to sync as well, and then sync the iPad again.
    Regards.

  • How to copy and paste the graphics from illustrator to MS word. What I tried is exporting in png with highest resolution and then inserting in to word. This loses a bit of resolution in comparison to direct copy and paste as EMF.  But if I do a copy and p

    How to copy and paste the graphics from illustrator to MS word. What I tried is exporting in png with highest resolution and then inserting in to word. This loses a bit of resolution in comparison to direct copy and paste as EMF.  But if I do a copy and paste, and then take a print of the document, all the graphs and text is printed upside down, flipped back.

    Use the Pencil Tool
    alex
    adrian stock wrote:
    > How to copy and paste a single pixel
    >
    > I want to copy a single pixel and then paste it in the
    position of
    > another pixel in the same image.
    >
    > (This is in effect changing the colour of the target
    pixel, isn't it.
    > But in my case copying an existing pixel seems simpler
    than selecting a
    > colour from the swatch or using the colour picker.)
    >
    > What is the most efficient way of doing this?
    >
    > I tried to select one pixel with the marquee tool. Then
    copied it with
    > control-C, but then how do I select the target pixel and
    paste with
    > control-V?
    >
    > Thanks for your help.
    >
    > Adrian
    >

  • I'm having issues syncing my ipod to my external hardrive's library. How do I sync and get the music from my external hard drive?

    I recently moved the music from my old computer in itunes to my external hardrive (changed the media file location and consolidated library). I connected my external hardrive to my new computer (windows 7) and changed my itunes media file to my external hardrive and consolidated my new computer's library to my external hardrive. When I connect my iPod, it is only grabbing the music from my new computer and not my external hardrive. How do I get the music from my external hardrive onto my iPod?

    Did you move the entire /Music/iTunes/ folder?
    File > Add folder to library and select the folder with music on the external.

  • How to create the Vote Form and Get the Result

    I have an assignment to create a website for voting and show the result online.  Anyone can tell me the steps to build such website???

    This tutorial uses jQuery and PHP
    http://code.tutsplus.com/tutorials/creating-a-dynamic-poll-with-jquery-and-php--net-57
    Nancy O.

  • How do I use a runbook Activity on an Incident and Runbook Initialize Data activity to sync and get the GUid from the Incident?

    I currently have a runbook running every hour to attach Incidents Templates to Problems. I would like to just add a runbook activity to the Incident Template to activate the runbook, and only link that Incident to the problem it needs to be attached to. 
    I don't know how to set-up my Initialize Data activity in my runbook to load the calling Incidents GUID though. 
    I'm very new to Orchestrator, so please be detailed in your directions.
    The way my runbook works now is, I make my incident templates have the PR # they are for in the Alt Contact Block. My runbook searched for that, and then loads the PR# it has there and creates the relationship between the two, and then deletes that PR# so
    it doesnt hit on the next search.
    I would like my activity that calls the runbook to pass the Incident GUID to the runbook, so my runbook only has to query the PR# included in the incident, and create the relationship that way.
    Thanks for any help you can provide.

    This might help:
    Working With Relationships in the SCSM Orchestrator Integration Pack
    Basically, you'll receive the ID of the runbook automation activity from Service Manager, which you can then use with the Get Object and Get Relationship to get the runbook activity object, then get the incident object related to it. I realize this is confusing,
    but there should be more info out there to search on as well. Hope that helps.
    Noah Stahl | Automys |
    Downloadable Microsoft automation examples and solutions

  • How can I call the jFreeChart to plot graph and get the result in Servlet?

    I want to use jFreeChart to plot time series graph, and then output the result in Servlet. How can I call the jFreeChart to plot graph and get back the result? Any source code for example? Thanks a lot!!

    Dave,
    ServletDemo1 and others were not in the distribution that I got (jfreechart-0.9.4). I found them under the premium demos somewhere in com/refinery/chart/demo/premium, but could not compile. They're complaining, among other things, about missing classes/packages com.refinery.date.SerialDate and com.refinery.ui. Am I using a wrong version of jfreechart?
    Thanks,
    -Alla
    There is a very simple servlet demo in the JFreeChart
    distribution:
    src/com/jrefinery/chart/demo/ServletDemo1.java
    This simply sends back an image to the browser.
    A second demo, which embeds the chart in an HTML page
    is:
    src/com/jrefinery/chart/demo/ServletDemo2.java
    src/com/jrefinery/chart/demo/ServletDemo2ChartGenerator
    java
    ...includes a time series chart as one of three
    options.
    Regards,
    Dave Gilbert
    JFreeChart Project Leader
    http://www.object-refinery.com/jfreechart/index.html

  • How to get the result from graph  based on table prompt?

    I have one report in which I am having one table and three Graphs. I have added table prompt for one column i.e department. In that I have given three values. The values of my table changes as per the table prompt. But my requirement is my graphs should show me the result as per the selection of departments in table prompt. Please give me the solution for the same.

    Hi,
    Create a event channel the table view and refer the same channel name in the graph properties.
    Edit Graph --> Edit properties --> Enable Master-Details Events --> Give the channel name.
    It will work for the selection of table .
    Mark if helps.
    Raja Mohamed

  • Execute command on UNIX and get the result

    I want to write a Java program, which can execute a shell script in UNIX and get back the result. Any idea?

    Check these two tips:
    How to execute a command from code
    http://www.java-tips.org/java-se-tips/java.lang/how-to-execute-a-command-from-code.html
    How to read output from a Command execution
    http://www.java-tips.org/java-se-tips/java.lang/how-to-read-output-from-a-command-execution.html

  • Using SUBMIT and getting the results back

    Hi,
    I need to call a BAPI on-line (not in the background) using a different User ID as the one that's logged in.  I read from the threads the use of SUBMIT ...VIA JOB. 
    CALL FUNTION 'OPEN JOB'...
    SUBMIT zsubmitted_program
           VIA JOB     l_jobname
               NUMBER  l_jobcount
               USER    i_user       ====> changed User ID
           TO SAP-SPOOL WITHOUT SPOOL DYNPRO
               SPOOL PARAMETERS ls_params
                  AND RETURN.
    CALL FUNTION 'JOB_CLOSE'...
    Questions:
    1. How would I know that the job is finished?
    2. How do I retrieve the messages returned by the BAPI so I can present it on the screen?
    Many thanks,
    Huntr

    Hi,
    I will be wrapping BAPI_MATERIAL_SAVEDATA into a Z program to run it and use the method mentioned above.  I need to know by that method when the batch job is done and how to retrieve the results.
    Is there a function module to retrieve the job status or log?
    Also I think if i write the bapi results in the spool, I should be able to retrieve the spool.  What is the function module to do so?
    Regards,
    Huntr

  • How to pull and display the document from an external storage medium?

    HI,
    We are having one external storage medium for SAP documents. In our case it is filenet server.
    My concern is .
    How can we pull the doc from the filenet server (external storage medium)?. I am in need, how and what an abap development team needs to be done?.
    Can anyone help in this regard ....to get the best logic and best technique ....!!!
    Note:
    I need to post this in ordinary abap not in webdynpro abap. I will do that. If any one get a chance to look into this and if you know .....please let me know the way.
    Thanks in advance
    Pons.
    Edited by: Ponnuchamy on May 31, 2009 1:30 AM

    in first page for user input :
    <form action="second.jsp" method="post">
    Are you happy?
    <br><input type="radio" name="radio1" value="yes" CHECKED>YES
    <br>
    <input type="radio" name="radio1" value="no">NO
    <input type="submit">
    in second.jsp output :
    Your answer is:
    <%= request.getParameter('radio1') %>
    Is it what you want to display?
    Hope that helps.

  • New palm and getting the info from my old palm on the new one.

    Hi there.  I had to have a new centro ordered because my first cento's keys stopped working.  The sprint store recommended me coming home and backing up all my data on my first centro while I was waiting for the new centro to arrive.  All of my data from my first phone is backed up on my computer but I do not know how to get all of my calendar events and what not onto the new centro.  As soon as I hook up my new centro with the hotsync cable it wants to create a new user on my computer.  I"m not sure if that's what I need to do in order to get my old data on my new centro.  The sprint store was able to get all of my contacts on my new phone, I'm mainly wanting all of my calendar (which has important dates and things going on) and my downloaded ringtones.  If anyone can please help me figure out how to get all the old stuff on my new palm that would be great!  Thank you!
    Post relates to: Centro (Sprint)

    When you connect the Centro to the PC does it only ask to create a new username or do you get the option to use an existing username? You should have this option. If you don't, make sure the Centro is not connected to the PC. On the Centro, go to hotsync, look in the upper right corner of the screen, is there a username listed? Is it the same name that is in Palm desktop that has your data?
    If the name on the Centro is different than the one in Palm desktop, you will need to erase the username on the Centro and then you should get the prompt to use an existing username in Palm desktop.
    Here is a link to the Palm article regarding erasing the username on your device. Use the Option 2 in the article to erase the username on the device using the shortcut character.
    Click on the following link to the kb.palm.com webpage for the article regarding How do I change or delete the user name on my handheld?
    http://www.palm.com/cgi-bin/cso_kbURL.cgi?ID=33416
    For reference purposes, click on the following link for the support page for your device on the kb.palm.com webpage.
    http://kb.palm.com/SRVS/NUA/launchTab.asp?t=home&fn=centro&mn=centro&cn=sprint
    There are links on the page to the user guide, troubleshooting, how to's, downloads, etc.

  • I had to restore my ipod touch, how do i do get the music from my itunes account back on my ipod?

    how do I get the music back on my ipod after restoring it?

    You can redownload iTunes purchases by:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store
    Synced media like apps and music are not included in the iPod backup that iTunes makes.

  • How to localize and delete the attachment from Inbox folder file?

    Hello,
    My name is Piotr Tyborowski and I'm the Technical Support Engineer in Doctor Web.
    I have got such suport request - one of our customers has problem with viruses in Thunderbird's Inbox folder - our antivirus scanner has found two Trojans in one file located in Inbox file and moved the whole Inbox file to quarantine. We know that these files are located here:
    >>C:\Users\Renatrix\AppData\Roaming\Thunderbird\Profiles\4dhjzo2v.default\Mail\Local Folders\Inbox.sbd\Konto WP\12145.part is ZIP archive
    C:\Users\Renatrix\AppData\Roaming\Thunderbird\Profiles\4dhjzo2v.default\Mail\Local Folders\Inbox.sbd\Konto WP\12145.part\KeyDLL.dll - infected with Trojan.KeyLogger.6153
    C:\Users\Renatrix\AppData\Roaming\Thunderbird\Profiles\4dhjzo2v.default\Mail\Local Folders\Inbox.sbd\Konto WP\12145.part\KeyDLL.dll - infected
    >>>C:\Users\Renatrix\AppData\Roaming\Thunderbird\Profiles\4dhjzo2v.default\Mail\Local Folders\Inbox.sbd\Konto WP\12145.part\svhosts.exe - packed by UPX
    C:\Users\Renatrix\AppData\Roaming\Thunderbird\Profiles\4dhjzo2v.default\Mail\Local Folders\Inbox.sbd\Konto WP\12145.part\svhosts.exe - infected with Trojan.Click.27588
    C:\Users\Renatrix\AppData\Roaming\Thunderbird\Profiles\4dhjzo2v.default\Mail\Local Folders\Inbox.sbd\Konto WP\12145.part\svhosts.exe - infected
    C:\Users\Renatrix\AppData\Roaming\Thunderbird\Profiles\4dhjzo2v.default\Mail\Local Folders\Inbox.sbd\Konto WP\12145.part - infected archive
    I'm not very familiar with Thunderbird, so my question is - is is possible to get to this 12145.part file and to delete it permanetly, even with the message which cointains it inside?
    Thank you in advance and Best Regards,
    Piotr Tyborowski
    Doctor Web

    Piotr,
    If it is practical, the absolutely safest approach is to delete the entire profile folder 4dhjzo2v.default while TB is shut down.
    If the person is using IMAP, or POP with the option of leaving emails on the server, there should not be a loss of emails (except in local folders).
    If there are significant emails in local folders, and they are not infected, they could be exported to a storage medium and later inported to the new profile. There is an add-on to TB which allows import and export of emails in various formats.
    The instructions on how to download and install it can be found at http://barryduggan.info/exportMail.php

Maybe you are looking for

  • Cannot get Guest wifi to work

    My home base is my AirportTC, connected to an Xfinity modem (Model Arris TG862). Extending my network is an Airport Extreme 802.11n (4th Gen). Using Airport Utility v6.3.4, on the ATC I selected the "Add Guest network" box, and put in all needed info

  • XI demo system

    Hi, I like to learn XI, is there a free demo system to download ? A+ Ihsen

  • Gap betwwen two lines in xml o/p

    Hi, I am working on Xml reports now. I am getting output but there is huge gap between two lines in the table. I want to reduce that gap. Any one can suggests any thing. Regards, Shakeera

  • Send port filter and Orchestration binding priority

    Hello, say there is some receive port RecvPort1. What will happen if some send port filter has BTS.ReceivePortName == RecvPort1 and some orchestration is binded to RecvPort1 also? When message come to receive location of RecvPort1 will it be transmit

  • OOo and openjdk don't play after recent update on 86_64

    Just did an update this morning and got a new openjdk package - I thought no ill of it 'cos OOo supposedly supports openjdk on x86_64. Well, it appears it doesn't as I keep on getting an error message when I open a particular document. I then have to