Enter the value of IN parameter of a function at the time of execution

Hi,
I have written a query and created a .sql file. So whenever I use to perform one action, I'll just run the .sql file from my unix box. But in one of the functions of my query, the IN parameter has to be supplied every time coz it changes from time to time. So please let me know the way how can I ask the user to enter the IN parameter for that only one variable whenever he executes the .sql file.
Regards,
Niraj

Hi, Niraj,
There is no way to get input from a user in PL/SQL or in SQL; you have to use front-end tools for that.
If your front-end is SQL*Plus, then you can use substitution variables in the function call. For example:
SELECT  *
FROM    table_x
WHERE   my_function (x, &y, z)  = 0;will stop and ask the user to "enter value for y" before compiling the query.
You can also use the SQL*Plus ACCEPT command to define a substitution variable like &y.
I hope this answers you question.
If not, post a complete script (including any tables or functions , other than ones that Oracle supplies) that you need, and a sample of the output you want. E.g "If the user enters 1, then the output should be ... but if the user enters 5, then it should be ...".

Similar Messages

  • Changing the value of a parameter that has been passed into an SSRS 2008 R2 report

    I support 200+ reports that all use stored procedures and have many drill downs with built in URLs.
    I want to do the below to avoid creating a brand new parameter that I will have to add to literally hundreds of places.
    We have what I'll call Param1 that receives a value from the user.  That Param1 is passed to the stored procedure(s) for the report and also embedded in any Action URLs for drill downs to other reports from that report.  All works great.
    Now I have a need to concatenate a string to whatever value they supplied which provides context for the environment in which they are running.  The reason I want to do this instead of creating a new parameter is because I need this in all my reports
    and as stated above I would have to make 100s of changes to make that happen.  If I can figure out a way to concatenate a value to the existing Param1 value I can greatly reduce the number of changes.
    I can't seem to be able to find a way to modify the value on an existing parameter that is passed into the report prior to report execution.
    I get an error when I simply try to concatenate something to the parameter in its Default property.
    I can't find a way to update a parameter value in the Report Code block.  There don't appear to be any methods available on the Parameter Collection to set the value of a parameter.
    Any ideas?
    Thanks!
    Nathan 

    Create a new parameter. Mark it internal, set it's value by expression to:
    =User!UserId+"MyNewValue"
    and pass it to the proc?
    Don't forget to mark helpful posts, and answers. It helps others to find relevant posts to the same question.

  • Determine the value of JOB_QUEUE_PROCESS parameter by considering HW ?

    Hello Experts,
    Is there any formula to calculate the value of JOB_QUEUE_PROCESS parameter by considering underline database server hardware?
    In metalink note 578831.1 mentioned, the steps to calculate the value of job_queue_process parameter however it didn’t consider hardware factor.
    could you please tell me on basis of your experience.
    My DB Configuration :
    Platform :- Linux x86 64-bit
    CPUs : 8
    Cores : 4
    Memory (GB) :23.41
    DB Version :- 11.2.0.3.0

    Sachin.Ichake wrote:
    Hello Experts,
    Is there any formula to calculate the value of JOB_QUEUE_PROCESS parameter by considering underline database server hardware?
    In metalink note 578831.1 mentioned, the steps to calculate the value of job_queue_process parameter however it didn’t consider hardware factor.
    could you please tell me on basis of your experience.
    My DB Configuration :
    Platform :- Linux x86 64-bit
    CPUs : 8
    Cores : 4
    Memory (GB) :23.41
    DB Version :- 11.2.0.3.0if hardware resources were unlimited, what would be the maximum number of concurrent batch jobs running?

  • Should I resize the value of LOG_BUFFER parameter to a larger one?

    Should I resize the value of LOG_BUFFER parameter to a larger one?
    The transaction of the application is invoking the job once every 5 seconds. The action is inserting more than 14MB of data into 3 tables.
    The current LOG_BUFFER value is 14MB (Oracle default).

    qck wrote:
    Should I resize the value of LOG_BUFFER parameter to a larger one?
    The transaction of the application is invoking the job once every 5 seconds. The action is inserting more than 14MB of data into 3 tables.
    The current LOG_BUFFER value is 14MB (Oracle default).As you may have guessed, your description doesn't suggest that you've noticed a good reason for increasing the size of the log_buffer - although the size of the transaction suggests that you may see some effects.
    The symptom you need to watch out for is time lost on "log buffer space". If sessions executing this transaction s are eporting a significant amount of time on this event, then you could reduce that by increasing the log_buffer (32MB is the next size to try). However, you may already be seeing other sessions losing time on "log file sync" waits - and if this time loss is significant it would be a clue that you should NOT increase the size of the log buffer.
    Regards
    Jonathan Lewis
    http://jonathanlewis.wordpress.com
    http://www.jlcomp.demon.co.uk
    To post code, statspack/AWR report, execution plans or trace files, start and end the section with the tag {noformat}{noformat} (lowercase, curly brackets, no spaces) so that the text appears in fixed format.
    "Science is more than a body of knowledge; it is a way of thinking"
    Carl Sagan                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How to get the value of a variable in group footer in the report footer also

    I have a placed a formula as below at the group footer and the report footer. The data is grouped on the basis of duedays which is again formula and the value in that is appearing correctly.
    Whilereadingrecords;
    Global Numbervar CNTONE;
    Numbervar P := P+1;
    IF P = 1 AND {@DUEDAYS} = 0
    THEN CNTONE := {spSUPPLIERSOA;1.INVOICEBAL}
    ELSE IF P>1 AND  {@DUEDAYS} = 0
    THEN CNTONE := CNTONE + {spSUPPLIERSOA;1.INVOICEBAL}
    At the group footer I get the value correctly for CNTONE but when I place the formula in Report footer I get the value for CNTONE as 0.
    Please do let me know how I could get the same value in the report footer also.
    Regards
    Sreejith J

    Hi Abhilash;
    When I give the statement whileprintingrecords then my above formula sums up only the first record and the last record of the group and when I give whilereadingrecords it adds up all the data in the group correctly.
    The formula that you mentioned for the report footer had worked out and it is showing my result correctly.
    I did not put up the reset formula on the group footer because as the group changes I had used another variable in another formula for example for the second group I used
    Whilereadingrecords;
    Global Numbervar CNTTWO;
    Numbervar Q := Q+1;
    IF Q = 1 AND {@DUEDAYS} = 30
    THEN CNTTWO := {spSUPPLIERSOA;1.INVOICEBAL}
    ELSE IF Q>1 AND  {@DUEDAYS} = 30
    THEN CNTTWO := CNTTWO + {spSUPPLIERSOA;1.INVOICEBAL}
    I have set up total 5 such formulas as the number of groups that will be formed is 5. I have put up these formulas on the group footer and suppressed it as I dont want to get it displayed.
    The as you suggested the solution for Report Footer I did that and getting the result correctly.
    I dont know I may be following a longer procedure
    Take Care
    Sreejith J

  • The value 4010 39 99 is not allowed for the field MARC-STEUC/BAPI_MARC-CTR

    Hi all,
    BAPI' BAPI_MATERIAL_SAVEDATA' throws error the below error while creating material.
    'The value 4010 39 99 is not allowed for the field MARC-STEUC/BAPI_MARC-CTRL_CODE'
    Any idea abt this error.
    Regards,
    Thiyagu

    Hi,
    As this BAPI is triggered from external sytem that by client in production environment , I would not be able to dig it further.
    Thats why I asked if anybody confronted the same error previously.
    Thanks for suggestion.

  • How to display the value of a column in a chart at the top of each column

    How to display the value of each column in a chart at the top of each column?

    Like this?
    Done using chart Inspector.
    For details, see Chapter 7,  Creating Charts from Numerical Data in the Numbers '09 User Guide. The guide may be downloaded via the Help menu in Numbers.
    Regards,
    Barry

  • The Problem is about Standard Back Button Function in the Report Program.

    The Problem is about Standard Back Button Function in the Report Program.
    In the Report,First call screen Then Using "write" output some information,That is ok. but In the GUI When I press back button that is standard button,it exit screen to program.
    My question is how can i do When i press back button,the screen can be back forward first screen instand of exit screen to program. Thanks .

    Hi,
    You can define your own PF-STATUS and in that assign the function code for BACK button anything except 'BACK'.
    The code would somewhat look like this:
    SET PF-STATUS 'TEST'.
    write : itab-col1,
               itab-col2.
    in the PF-STATUS 'TEST', assign the function code to BACK button as 'BCK'.
    Now in your program you can use the event AT USER-COMMAND.
    In this you can handle the functionality of BACK button.
    Hope this helps.
    Regards,
    Himanshu

  • Any solution to the iOS 6 bug for auto lock function for the iPhone 4S

    Any solution to the iOS 6 bug for auto lock function for the iPhone 4S

    My guess is they don't care. Most likely they're illiterate and don't know what a colon is for. They probably think it's a little-used character. Remember: these are the people who don't know the difference between "deprecate" and "depreciate".
    I have the same colon problem as you do. But it's not the biggest problem I have encountered in Lion. If it was only that I'd be Mr. Delighted with Lion. There's worse than having a colon - uh -  that won't cooperate. A lot worse, in Lion.

  • I have two iPads. With two functioning iPads. Is it possible (on the same ID) to sync two of them differently with the same account. So I want to use the new iPad for all my current functions. The old iPad for just my music collection?

    I have two iPads. With two functioning iPads. Is it possible (on the same ID) to sync two of them differently with the same account. So I want to use the new iPad for all my current functions. The old iPad for just my music collection and remove all the other stuff?

    Very easily. I have an iPod touch and iPad on the same account with totally different content.
    If you use iTunes, connect each iPad to your computer and open iTunes and deselect any automatic updating/syncing. If you don't sync with iTunes but have them set up independently, under the settings, App Store, turn off automatic downloads for apps, etc.
    I'm old fashioned, I set up and sync my iPad and iPod to my computer and iTunes. Each device has a different name  and I manage content manually and only allow sharing on what I want shared.

  • Force a user to enter a value for a parameter.

    Hi,
    I have a report with a bunch of parameters and I want to force the user to enter values for two parameters amongst all of them. Like for example when the user doesn't select values for those 2 parameters he should get a dialog box saying "please enter value for xyz parameter" or something like that, which will force the user to enter a value for the parameters before he can see the report.
    Please let me know if BI Publisher can do this.
    Thanks,
    DY

    Thanks for your replies BIPUser. I have recently started working on BI Publisher without a lot of help around.
    The information in the link is what I was thinking of, if there is no such feature I'll have a default value for those 2 parameters.
    Thanks,
    DY

  • Get the value of a parameter

    Hello,
       within the event "AT SELECTION-SCREEN ON VALUE-REQUEST FOR <field x>" I have to call a function and need the value of other field (lets say field y), but in spite of the field y has a value it comes blank, If I press enter in the report then the field y does appear with his value.
    Anyone know a way to get this value without having to press enter in the report?
    Thanks very much for your help

    Try using DYNP_VALUES_READ to get the value of the field Y.
    Regards,
    Ravi

  • How to get the value of a parameter/field in a ADF Read-Only Form

    Hi,
    My requirement is as follows. Could anyone shed some light on this issue.
    I am showing the records from db table using ADF Read-Only Form ( which uses ViewObject created for the table). Now I want to capture(get) the value of a field in this form and then have to invoke an action based on the value in this field. I mean to say the next page depends the value of a field in this form.
    Please suggest how can I achieve this functionality?
    Thanks in advance.
    ~Sivaji

    That's indeed what Sivaji needs.
    In the page definition you can add a value to the parameters of a certain method. Like RJundi mentioned, point to the attribute of the current row.
    Example:
    The value of the read only textfield will be something like this:
    #{bindings.EmployeeName.inputValue}points to an attribute value in the pageDef of the page:
        <attributeValues id="EmployeeName" IterBinding="AllEmployees">
          <AttrNames>
            <Item Value="EmployeeName"/>
          </AttrNames>
        </attributeValues>The attribute value has also an iterator binding defined in the page def:
        <iterator id="AllEmployees" RangeSize="10"
                  Binds="AllEmployees" DataControl="MyService"/>If you want to 'pass' the attribute of the current row to the service, you can create a methodaction (eg: public void printEmpName(String name)) in the page def or you can drop the method from the datacontrol on to the page. After dropping the method, a screen will appear asking to fill in a value for the parameter ('name' in this example). Fill in '#{bindings.EmployeeName.inputValue}' if you want to pass the EmployeeName of the current row.
    Hope it helps,
    Koen Verhulst

  • Entering a Value and Tabbing out of af:inputListOfValues displays the wrong value

    Good morning. I am having an issue with the autosubmit and tabbing out of af:inputListOfValues in my code.
    Problem: When I type in a valid value and tab out of the field, it ignores the value I entered and displays whatever the first list in the query result instead regardless of the value I typed.
    My code snippet. What it does is simply an LoV search of Employee No attached to an entity attribute and depending on selection, it will display the Employee Name within the page. (it also retrieves a table view depending what employee number was entered)
    <af:inputListOfValues id="empNoId"
                 popupTitle="Search and Select: #{bindings.EmpNo.hints.label}"
                  value="#{bindings.EmpNo.inputValue}"
                  label="#{bindings.EmpNo.hints.label}"
                  model="#{bindings.EmpNo.listOfValuesModel}"
                  required="#{bindings.EmpNo.hints.mandatory}"
                  columns="#{bindings.EmpNo.hints.displayWidth}"
                 shortDesc="#{bindings.EmpNo.hints.tooltip}"
                   binding="#{workLocationBean.txtEmpNo}"
                  partialTriggers="id1"
                 valueChangeListener="{bean.onEmpNoChange}"    
                 autoSubmit="true">
            <f:validator binding="#{bindings.EmpNo.validator}"/>
      </af:inputListOfValues>
    Other things to note:
    When I enter a valid employee number and click anywhere in the page (not TAB), it behaves correctly.
    I have been trying to figure this out for days. Even my valueChangeListener gets the wrong value (when I do System.out) when I tab out so I am not sure where to catch it and replace it with the correct value.
    Thank you.

    This usually happens when primary key is not set in view object used by LOV.
    Dario

  • Setting the value of a parameter

    Hi Experts
                         I want to call transaction ME55 through a Z program and stop at the selection screen with values of ZPROGRAM. There is one parameter which does not have a parameter id. Is there any way to set it.
    Also we cannot do submit because there is code in ME55 based on sy-tcode. So while we do submit then the TCODE is of our ZPROGRAM and hence ME55 shows different output. Can we deal with this?
    Also if we write BDC then the ME55 is behaving unexpectedly ie we wrote a BDC till the first screen of ME55 and then we excute it and try to release it , it releases the PR but instead of stopping at that screen which it would have done if we run ME55, it is coming back to our ZPROGRAM.
    Please help to solve the problem ie set the value of the parameter.

    Which parameter are you trying to set?

Maybe you are looking for

  • Clearing message area in Web UI

    Dear Experts, I have kept passport field as mandatory in account creation application. I am displaying custom error message if its not entered. Assume end user id not entering passport and fills other fields and presses enter. In EH_ONSUBMITONENTER e

  • Acrobat X add-in not working with Visio 2010

    Hi, I have the following relevant software installed: Windows 7 Enterprise, SP1, 64-bit. Adobe Acrobat X Standard, version 10.1.5 Mircosoft Visio Professional 2010, 32-bit. Microsoft Office Professional Plus 2010, 32-bit In Word, Excel and Powerpoint

  • How to make a whole table row be read at once?

    Hi, I want to make a whole table row be read at once by screenreaders if the table is not editable? I tried to use "getAccessibleSelection" and return a own implementation which returns the number of columns at "getAccessibleSelectionCount". But if "

  • How to achieve Incremental deployment of Code Files to different environments of windows azure using TFS and Visual Studio ?

    Hi We are new to Windows azure and are developing a web application. In the beginning of the project , we have deployed complete code using Sitefinity Thunder to different environments which actually publish complete code. But now as we are in the mi

  • Exporting Address Book to Excel

    I would like to export addresses from my Address Book to Excel, to create a database Christmas card list that I can update every year with "sent", "received", and related information. Is it possible to do this? If not, does anyone out there know any