Using list values

I would like to know if there is a way to do pass a parameter p_Parameter having a value of say A1, A2,A3,....An for a query in PL/SQL stored procedure for a query such as :
Select *
From Employee
where EmpId in (p_Parameter)
I was able to resolve the issue by building a query string as given below but I would like to be able to use a PL/SQL stored procedure if possible.
StringBuilder sb=new StringBuilder ( );
sb.Append ( "SELECT " );
sb.Append ( " " );
sb.Append ( "FROM Employee " );
sb.Append ( " " );
sb.Append ( "WHERE 1=1" );
sb.Append ( " " );
sb.Append ( "AND EMP_ID IN ("+" " );
for ( int i=0; i<m_Count; i++ )
if ( i<m_Count-1 )
sb.Append ( ":Emp_ID"+i+"," );
cmd.Parameters.Add ( "Emp_ID"+i, OracleType.Int32 ).Value=p_EmpList ;
}//end of if
else
sb.Append ( ":Emp_ID"+i+")"+" " );
sb.Append ( " " );
cmd.Parameters.Add ( "Emp_ID"+i, OracleType.Int32 ).Value=p_EmpList [i];
} //end of else
}//end of loop

Hi,
AskTom has a couple good ideas..
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:110612348061
http://tkyte.blogspot.com/2006/06/varying-in-lists.html
Hope it helps,
Greg

Similar Messages

  • Comment is not working properly when using list values - multiple rows

    Hi
    I am trying to send comments in drop down menu but it is not working.
    I have a list field with the following values ( "Not Started";"In Progress";"Completed")
    the default value should be "Not Started" but if I select "In Progress" at the top and click save, I get it in all the rows.
    can't seem to figure out why is not working.
    =IF($P22="Not Started";EVCOM($P22;$E$2;$M22;Parameter!$C$20;$E$5;"SCHED";Parameter!$C$23;Parameter!$C$25;$E$6;$E$8;$E$10;$E$11;$E$12);IF($P22="In Progress";EVCOM($P22;$E$2;$M22;Parameter!$C$20;$E$5;"SCHED";Parameter!$C$23;Parameter!$C$25;$E$6;$E$8;$E$10;$E$11;$E$12);IF($P22="Completed";EVCOM($P22;$E$2;$M22;Parameter!$C$20;$E$5;"SCHED";Parameter!$C$23;Parameter!$C$25;$E$6;$E$8;$E$10;$E$11;$E$12);"Not Started")))
    I have tried to use plain EVCOM function but the result is same.
    thanks

    Hi,
    Here is a blog for your reference:
    "The collection has not been initialized. It has not been requested ..." in SharePoint 2010 ECMAScript Client Object Model.
    http://youdhbir.blogspot.com/2012/06/collection-has-not-been-initialized-it.html
    In SharePoint 2010, we can also use REST Interface(listdata.svc) to achieve your requirement.
    http://msdn.microsoft.com/en-us/library/ff798339.aspx
    http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2010/01/21/introduction-to-querying-lists-with-rest-and-listdata-svc-in-sharepoint-2010.aspx
    http://akurniaga.wordpress.com/2012/09/27/using-listdata-service-in-sharepoint-2010/
    More information:
    http://stackoverflow.com/questions/18936908/retrieve-parameter-from-executequeryasync-javascript
    Best Regards,
    Dennis Guo
    TechNet Community Support

  • How to get metadata option list values derived from a table/view using SOAP

    I am writing an ASP.NET application that replicates some of the features of the SCS search interface. I have looked at the GET_DOC_METADATA_INFO service and its SOAP output. It has a few missing pieces of information, like the option list values for a field if that fields values are derived from a separate table/view. Some of the fields I am dealing with also make use of Dynamic Control Lists (DCL). Is there a way to get the DCL info using SOAP? I did notice that the dOptionListKey element contains the name of the view from which the option list values will be derived. However, I cannot find a service that takes the view name as a parameter to return the option list values. I have looked in the services reference manual, but I have not had any luck finding what I am looking for.
    TIA
    - Tyson
    Message was edited by: Add the word 'get' to the subject.
    Tyson

    Hello,
    What error you are getting? You code seems to be ok. I have tested below code and working fine
    XPathNavigator rTable = MainDataSource.CreateNavigator();
    String ddlSectionSelectedValue = Convert.ToString(rTable.SelectSingleNode("/my:myFields/my:ddlSection", NamespaceManager).Value);
    One think you can check that keep dropdown value display name and id same.
    Hemendra:Yesterday is just a memory,Tomorrow we may never see<br/> Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • Need to use Select List value as column name

    I want to have a WHERE ? IS BETWEEN ? AND ? clause.
    I am using the PL/SQL Query returning a SQL Query as a report. This uses bind variables for items I had set on my form..... If I hardcode something like:
    'WHERE STARTDATE IS BETWEEN '||
    'TO_DATE(:P1_START,''dd-MON-YYYY HH24:MI'') AND '||
    'TO_DATE(:P2_END,''dd-MON-YYYY HH24:MI'')';
    I have no problem, but I have 2 date columns, STARTDATE and ENDDATE, and would like to use the value in a select list and not have to hardcode "STARTDATE" in there. I have not been able to do this, does anyone know how to use a bind variable as a column name? From reading some posts I think it might not be possible.

    Heather,
    You're on the right track, just glue in the column name so that it becomes part of the returned query string from the function (...'WHERE '||:COLNAME||' IS BETWEEN '|| ...).
    Note that the bind variable is not part of the returned query string, but the column name obtained from the bind variable when the function executes does become part of the query string.
    Scott

  • Using Select List value for building report

    I have an interactive report form. I have a "After Header" (LOAD) process that run sql commands that will populate a table with the data that the report needs for a given week.
    I have a Select List item that is run as a "Before Header" that gets a list of dates from a table. The dates only contain the first day of the week for the past two years. It is called "WEEK_OF" table and the column is called "WEEK_OF_DATE".
    The default value for the Select List is the first day of the current week. And then all of the first day of the week from the WEEK_OF table.
    I would like the LOAD process to use the value in the Select List. So at start up I would like the List to show the current week and report to begin with data from the current week.
    So I have tried to use the variable :WEEK_OF_DATE (Item name) as the beginning date for the report. However :WEEK_OF_DATE is null.
    Also, after I have the report displayed, I would like to select a new date from the list and have the report automatically refresh with that new data.
    Any Ideas what I am doing wrong?

    Hi Lyle,
    When setting a default value for a select list that is to be used to filter a report, I have found it best to do that using a computation, conditional on the item being NULL and running Before Header. If other computations rely on this value, then it should have the lowest sequence number to ensure that the value is available for those.
    Andy

  • Where-used list for queries restricted by characteristic value

    Hi SDN Community
    I came across this useful documentation on how to track down a query which is restricted to a certain hierarchy
    Queries that use a hierarchy
    Is it possible to track down queries from a given characteristic value.
    eg. ID = 355 from InfoObject ZIDMEASP, represents Production Measure ID.
    Thank you.
    Simon

    Hi  SDN community,
    So far i have had this response from SAP OSS Message but require this as a consulting issue.
    Is it such that anyone is aware of the way to tract down queries from restricted value,
    Thank you.
    25.10.2007 - 10:54:51 CET    SAP    Reply 
    Dear Simon,
    You can track down the query from a characteristic as per the following
    steps, eg.
    - Tr_cd: RSD1
    - eg. input ZIDMEASP to Infoobject
    - click on "Where-used list using AWB"
    - find out which InfoCube, InfoSet, ODS Object etc. are using
    infoobject ZIDMEASP
    - open bex analyzer, in the "Select query" screen, search with the
    InfoCube/InfoSet/ODS Object one by one under "InfoAreas", then you
    can see which query is using them

  • Using drop down list value in jsp with AJAX

    Hi All,
    I am having a jsp page , which contains a dropdown list.
    When user selects an item from the list, I've to pass this value to my java class to access other related information to be displayed on the same page without refreshing/submiting the page.
    Now the problem is, i am getting selected value in java script function but how to use this variable & pass it to java class.
    I googled a lot and found that AJAX could be used for it. Please suggest me that -
    1) Whether AJAX is the only approch ? I am affraid of it bcoz I hvn't work on it.
    2) Is there any other workaround by which i can use that value & call my java class method, without refreshing the page?
    3) If I've to use AJAX, plz help me if u've similar example. I went through the w3 scool, but not getting much idea.
    Kindly help me, the problem is very urgent with the strict timeline.
    Thanks & Regards,
    Sneha

    sneha wrote:
    1) Whether AJAX is the only approch ? I am affraid of it bcoz I hvn't work on it.Wait for it...
    2) Is there any other workaround by which i can use that value & call my java class method, without refreshing the page?Yes, Ajax!
    3) If I've to use AJAX, plz help me if u've similar example. I went through the w3 scool, but not getting much idea.Well then you'll have to do more work. Do a Google search, research more. Ajax is such a broadly discussed topic, you have to be very bad at your work if you cannot find decent resources for it in the context of your problem domain.
    To give you a hint, I suggest you look into JQuery. It is quite a popular Ajax javascript toolkit.

  • Help : How to use list of values in Variable in ODI

    Dear All,
    I have a multiple values in table, and I would to use these values a a parameter in ODI to retrieve rows based on these values. As I know that we can use single value in variable in ODI.
    Any one can Help me please?

    Can't you use a join between the tables ?
    ODI mostly take advantage of native technologies.
    i.e If my source technology is oracle then i will create a join between the table i.e. MAINTABLE.column = LOVTABLE.COLUMN and also put a filter on LOVTABLE to take required values.
    OR you can write a subquery in the Filter i.e. MAINTABLE.COLUMN in ( Select LOVVALUES from LOVTABLE where LOVTABLE.ATTRIBUTE = 'BUSINESS_UNIT')

  • Using Characteristic value with Replacement path variable

    Hi All,
    Could you please let me know if it is possible to use charecteristic value instead of key figure with replacement path variable. My requirement is to use factory calendar id as the replacement variable on plant characteristic, now when I choose replcaement variable with Attribute value, the dropdown menu only gives the list of key figures assigned as an attributes to Plant.
    Now I am looking for a solution to use factory calendar id as the attribute.
    Thanks for your help in advance.
    Regards
    SS

    Hi sachin
    U can use it
    Look at these links
    Re: Customer exit &  Replacement path........?
    Variable with Replacement Path
    Re: Replacement Path for Charastrictics Variable
    http://help.sap.com/saphelp_nw04/helpdata/en/03/6ba03cc24efd1de10000000a114084/frameset.htm
    Regards
    KR

  • Problem using default value of report parameter 1 to validate parameter 2 passed in to report

    I am having a problem with an SSRS report using the default value of report parameter 1 to validate parameter 2 passed in to report (via C#) instead of using the value of parameter 1 that is also passed into the report.  Here are the
    simplified details:
    Using SSDT, SQL Server 2008 R2
    SSRS report has 2 parameters:
    P1 -- text, hidden, default value 'R1', ... front-end C# code can pass 'R2' or 'R1'
    P2 -- text, allows multiple values, list of available values provided by stored procedure (sproc_list) that takes P1 value as a parameter.  Hence, sproc_list either provides a list for P1 = 'R1' or P1 = 'R2'.
    List for P1 = 'R1' is 'A', 'B', 'C'
    List for P1 = 'R2' is 'A', 'B', 'D'
    Values for P1 and P2 can be passed in via C# to the report.
    The C# front-end displays 2 report choices to the user, R1 and R2, where both choices call the same RDL; but choice R1 passes in 'R1' for P1, and the choice R2 passes in 'R2' for P1.
    Upon a users 1st time use of the report no parameters are passed in.  Then when the user exits the report, the parameter value for P2 that was chosen is saved off to a file for R1 or R2, and used the next time the user selects the report.
    Everything always works fine for report R1 since the default value for P1 is 'R1'.
    When R2 is chosen and the user selects 'D' as the value for P2, runs the report, then exits, the P2 value of 'D' for R2 is saved to a file.  When the user returns the next day to run report R2, 'R2' is passed for P1, and 'D' is passed for P2.
    This is when the problem occurs.  The value of 'D' for P2 is validated against a list generated for P2 based on the default value of 'R1' for parameter P1.  Hence, SSRS considers 'D' an invalid value for P2 and blanks out the P2 parameter. 
    The user can then use the drop down list for P2 and choose 'D', but this defeats the purpose of saving the parameter values to be used the next time.
    Why is the stored procedure that provides a list of available values for parameter P2 using the default value of 'R1' for parameter P1 instead of using the value of 'R2' passed into the report for parameter P1?

    Hi Tom,
    Sorry for my delay.
    If I understand correctly, you have two parameter in your report. It is a couple of cascading parameter. If we have choose ‘R1’ of P1, the P2 values is A, B, C. ‘R2’ of P1, corresponding P2 values is A, B, D. What your requirement is to save the end use
    select option of these two parameters.
    In SSRS, if we have configure the parameter with default value. When we run the report, the parameter will fill with the default value to filter data. If we want to save the last status we are render the report, we need to update the default value of P1.
    If we are query the default value from database, if possible, we can
    update the database try to resolve the issue.  Alternatively, we can set the dynamic default value for the parameter.
    Hope this helps.
    Regards,
    Alisa Tang
    Alisa Tang
    TechNet Community Support

  • Adding Drop Down List values from table fields

    Hi all,
    Recently we have switched from Microsoft's Infopath to Adobe's LiveCycle Designer.  In InfoPath i was able to allow a user to enter data in a table and then use that data as values for a drop downlist, which could in turn be used in another table.  Infopath made it relatively easy to do this, but I assume it requires scripting in LiveCycle.  Here is an example that make make it easier to to explain:
    Let's say we have a form with a table that has a colomn where the user can enter a value in a table let's say "Computer Name":
    Computer Name | IP | Vendor | Serial Number|
    PC 1
    ---------------------| 192.168.2.34| HP | US4839494
    PC 2
    PC 3
    PC 4
    Further down the form there is a nother table with a drop down list.  I want the values of the drop down list to be what ever values were entered for "Computer Name" in the previous table.  So in this case the table would look like this:
    Computer Name | Acquisition Date| End of Life Date
    <Drop DownList>|  07/21/2010 | 07/21/2014
    The drop downlist values would be "PC1, PC2, PC3, PC4"  or whatever values were entered in the previous table.  Essentially, I am trying to avoid from having users type in "Computer Name" data every time the "Computer Name" needs to be entered.  It would be so much easier to enter all "Computer Name" values and then use those values as part of a drop down list to avoid excessive typing.
    I hope this makes sense, it is fairly easy to do in InfoPath and I am sure there is a way to do this in LiveCycle.
    Let me know if my explanation is not clear enough.
    Thanks!

    Thanks for the feedback, but it doesn't seem to quite accomplish what I am trying to do. I've tried using global binding as you specified, but the outcome is not exactly what I want.  Perhaps this drawing can help depict what I am trying to do:
    http://imageshack.us/photo/my-images/153/dropdownlist.png/
    On the picture I manually defined the values for the drop down list.  Again, I want these values to be taken from "Computer Name" in the table above.
    Thanks!

  • Problem in sending drop down list value to jsp page showing  null value

    i am trying to send a drop down list value from client side to a jsp page but getting null value
    this is first page where i have accessed data from database and putted it in a drop down list
    <select name="sub">
         <%
         while(rs2.next())
         cat=rs2.getString(1);
         %><option value="<%=cat%>"><%=cat%></option><%
         }%></select>
    <input type="submit" value="Go"></input>
    now on submit i am going to another page
    where i want the selected value from drop down list to be printed
    i have used there
    <%
    String subject= request.getParameter( "sub.value" );
    out.println(subject);
    %>
    but it is printing null here what is the problem that i m facing
    thanx & reagrds
    sweety

    how to generate dynamically names for text boxes
    i am generating text boxes in while loop when selecting data from database
    while(rs1.next())
    name=rs1.getString(1);%>
    <tr>
    <td>1</td>
    <td><%out.println(name);
    //i am printing here stud_id a unique key and want to update records from following text boxes to particular stud_id
    %></td>
    <td><input type="text" name="????"></input></td>
    <td><input type="text" name="????"></input></td>
    <td><input type="text" name="????"></input></td>
    <td><input type="text" name="????"></input></td>
    </tr><%
    the structure is like
    stud_id | attended theory | conducted theory | ateended practical | conducted practical
    where attended theory, conducted theory............. are to be inputed manually for all students and then update in database
    so i am facing problem in generating names for textboxes how to do that
    so that those can be updated in database for particular student
    Thanx & Regards
    sweety

  • Dynamic parameter list values

    Hi all,
    I'm new with Crystal Report, and I have a problem.
    The goal is to create a Price List based on SAP conditions tables.
    So, In my report I have linked table  Axxx KONP KNA1 MAKT  MVKE T179T  TINCT TVSBT.
    All work find except for the customer parameter selection.
    I want create a dynamic list with Customer Number and description (but only those which exist in table Axxx)
    I can create a dynamic list based on KUNAG and KUNWE from table Axxx(master table), but I have only the Number  of customer and no description (because description don't exist in Axxx table)
    I have try to select NAME1 form KNA1 table, but without success.
    I have search in SAP about a table which contain Number, Name1 and Parvw(partner role) but without succes.(table KNVP don't have Name1)
    I have try to create list value from KNA1 but whe have much more customer and the list is > then 1000 occurence(too big!)
    Do someone have an idea to create a dynamic list which take his information from two tables linked ?
    Or another solution to reach the goal...:)
    Thank in advance for your suggestion,
    Regards
    Martine Bombardelli

    Your requirement for me looks like a straight forward task.
    If you need a DP on 2 fields from 2 different tables in SAP using Integration Kit all you need to do is:
    > create a new parameter in the report
    > select 'Dynamic' from the List of Values drop down. Your options in the Parameter window will change for dynamic compared to static.
    > Choose Data Source: New
    > Below 'Value' select table1.Customer number and next to it under 'Description' select the table2.Description and set the further options you require under the Value options.
    Just as an FYI...there is no option to have a custom SQL when working with SAP Intg Kits. Business View Manager is also not helpful.
    So if a dynamic prompt is needed for a Crystal report above are steps it can be achieved, no other option is available today.
    Thanks,
    Madhu

  • Populating Combo Box list value In Multiple Row

    Hi,
    i to have the same problem .
    I have used add_list_element to populate the list value of the combo box in multiple row.
    I am selecting the list value from the database where the combo box value will be different for each row. However, when i do this.
    All the previous row combo box list value will follow the combo box value in the last row. How can i resolve this?
    i tried with lov but hasnt had any sucesss.in case of LOV can we make the list to appear automatuically and select a value????i havent had much sucesss over it??
    is thr any work around for this apart from lov?

    Hi,
    which product or technology are you talking about ?
    Frank

  • Combo Box - List Value Property

    I have a combo box in a form (Forms 10G) which is populated at runtime using values from a parameter table.But when I generate the form it gives a warning message that the list item property has to be filled .
    The combo box should display only the values from the database but it should not have any default values.
    How can I supress the warning message and avoid entering the list values proeprty at design time.
    Thanks in Advance.

    The warning is part of forms functionality, but is just that, a Warning, and the form should compile if not an error exists. Not sure if there's a way to suppress it, and You can simply leave the list with no values in Your design, as You will provide them at runtime. If coding is ok Your list should display the values You extract from the DB

Maybe you are looking for

  • Issue of Excise Duties in Foreign Currency in J1IIN

    Dear All, As one of my user has created Export Excise Invoice on 31st of May.  Unfortunately Exchange Rate was not maintained by him for currency Euro in OB08 and While creating the Excise Invoice all the duties came in EURO but the document currency

  • Blue screen of death when syncing to iPod and iPhone.

    I wish I could laugh. "Upgraded" to iTunes 8 and no longer can use my computer to sync to either my iPhone or my iPod. Thanks for the upgrade Apple. Now that I cannot update my portable music devices I have the extra time to stare at the new visualiz

  • No Material classification view in material master.

    Hello all, I have created LSMW for material master upload . Material is getting created through this, but 'classification view' is not getting created. But i can see the material- class assignment in CL20N. This problem is for specific material group

  • Same partner functions shared by customer and vendor

    Need to upload the partner functions centrally and then this to be mapped to Customer, Vendor & etc., i.e. these partner functions to be shared. Can anybody suggest me how to do this by using LSMW?

  • Query to display integer and decimal and integer in the same column

    Hello ,  Have a question,  is there a easier way to do this.. is the question i have a column called units.. and i need to display either a integer in it if the value does not have any value after the decimal point .. so it shud be display as integer