Passing a string into an SQL query IN statement

Hello,
I need to connect to a database to pull some data to dynamically create a form based on the data I pull back. My SQL query works fine when I manually run it through a SQL client tool, but when I try to pass it through my workflow I'm having trouble with passing my string into the IN part of the statement. So if for example my SQL query is:
SELECT Field1, Field2, Field3 FROM Table1 WHERE Field4 IN (?)
I have a process variable that has the string I'm trying to pass into the ?, but I don't seem to be able to get the query to run. I have tried setting up my query to run as a Parameterized Query (passing my string process variable into the ?), and by setting the query up through xPath (where I am calling my process variable with an xPath declaration), but am not having any luck.
The process variable I am trying to pass is formatted such that I'm passing 'Value1','Value2','Value3' but I can reformat this string if need be. Even with using test data I can't get the query to return anything. For test data I have tried: 'Value1','Value2','Value3' ; Value1','Value2','Value3 ; Value1,Value2,Value3 but the query never returns any data. I can't seem to see how to format the string to pass into the query. The Query will work with a single Value in the test data, but as soon as I try to pass multiple values within the string it fails. Any suggestions?

The problem looks to be a limit on what I can pass into the SQL query component. My string is coming from data returned from another database. I take the xml output from that database call, pass it through a set variable component to remove my xml tags from the string, and then format the string in a script component (I have to do it this way because of the way the data coming out of my first database call). I've put in loggers, and can see that the string I'm passing into my query that is giving me problems, is formatted the same way as if I were to use the concat function Scott listed above. It looks like there is a limitation on what can be passed in my variable. I have tried creating my entire SQL query statement in a set variable component, and then just calling the process variable that holds that statement, but there is a character limit of 128 character for what can be passed in a variable through xpath in the SQL query component.
The next thing I tried was changing my SQL where clause. Instead of passing my variable directly into the IN statement I set up a PATINDEX('%:'+countyname+ ':%', ?) > 0 call to check for the values in my database call. As you can see I took out the "," that I was passing as part of my string, thinking that the SQL component was getting confused by them, and placed ":" characters around my values being passed in my string variable. No matter what I try to do though I'm not able to get the query to run. The component looks like it is taking my string, and is seeing the whole thing as a string instead of passing it as individual values within a string.
I think I'm getting close, but I keep getting a Content not allowed in prolog exception in the server logs.

Similar Messages

  • Passing user parameter into your sql query

    I've created two user parameters...'Order_date_from' and 'Order_date_to'
    I've written a simple query to list the total order amount, order number, party name and ordered date
    Select sum ((unit_selling_price)*(ordered_quantity)), count(line_number), oe_order_headers_all.order_number, hz_parties.party_name, oe_order_headers_all.ordered_date
    from oe_order_lines_all,
    oe_order_headers_all,
    hz_parties,
    hz_cust_accounts
    where oe_order_lines_all.header_id=oe_order_headers_all.header_id
    and oe_order_headers_all.sold_to_org_id = hz_cust_accounts.cust_account_id
    and hz_cust_accounts.party_id = hz_parties.party_id
    group by order_number, party_name, ordered_date;
    I want to know how I can pass the value for the above mentioned parameters into my sql query so that it reflects as the 'ordered_date' in the report and only shows the data for the dates that the user inputs.
    Any feedback would be appreciated. Thanks.

    I want to know how I can pass the value for the above
    mentioned parameters into my sql query so that it
    reflects as the 'ordered_date' in the report and only
    shows the data for the dates that the user inputs.
    Any feedback would be appreciated. Thanks.And how does the "user" input these dates?

  • How to pass a value into a SQL Query?

    Hi There,
    I want to know if there is a possibility to pass a dynamic value in a sql query. For example I have a currency rate value (ex: rate = 1.319, 2.23 etc) which user wants to input when running the query (The rate is not taken from the system, so I cannot compare to any table column and pass it as a parameter).
    And this rate has to be used in my query to do some calculation. Is this possible? The value :p_currency_rate doesn't work
    Any ideas please?
    Thank you,
    Prathibha

    SELECT DISTINCT
    hou.name
    ,poh.segment1 po_num
    ,pol.line_num po_line_num
    ,poh.currency_code
    --,trunc(poh.creation_date) po_creation_date
    ,pol.cancel_flag
    ,msi.segment1 item_num
    ,pol.unit_price
    ,round(cost.item_cost,5)
    ,round((&p_rate * pol.unit_price),5) "CONVERSION"
    ,(cost.item_cost - round((&p_rate * pol.unit_price),5)) difference
    ,pov.vendor_name
    FROM
    po.po_headers_all poh
    ,po.po_lines_all pol
    ,po.po_vendors pov
    ,hr.hr_all_organization_units hou
    ,inv.mtl_system_items_b msi
    ,bom.cst_item_costs cost
    WHERE
    poh.po_header_id = pol.po_header_id
    and pov.vendor_id = poh.vendor_id
    and poh.org_id = hou.organization_id
    and hou.organization_id = :p_operating_unit
    and poh.currency_code = :p_currency
    and poh.creation_date between :po_creation_date_from and :po_creation_date_to
    and poh.type_lookup_code = 'BLANKET'
    and msi.inventory_item_id = pol.item_id
    and cost.INVENTORY_ITEM_ID = pol.ITEM_ID
    --and (cost.item_cost - pol.unit_price) <> 0
    and (cost.item_cost - round((&p_rate * pol.unit_price),5)) <> 0
    and cost.organization_id = 1
    and msi.organization_id = 1
    and cost.cost_type_id = 3 --- Pending cost type
    and nvl(upper (pol.closed_code),'OPEN') not in('CANCELLED', 'CLOSED', 'FINALLY CLOSED', 'REJECTED')
    and nvl(upper (poh.closed_code),'OPEN') not in('CANCELLED', 'CLOSED', 'FINALLY CLOSED', 'REJECTED')
    and nvl(pol.cancel_flag, 'N') = 'N'
    and &p_rate user parameter
    I want this p_rate to be passed as a user parameter.

  • Passing JSP value into an SQL Query

    Hi,
    I am developing a site for a cruise ship company as part of a project. My problem is as follows . . .
    I have a page called cruiseReservation.jsp which passes the value of the selected cabin to the cruiseDetails.jsp page:
    href="CruiseDetails.jsp?cabin_id=cabinE105 " so . .
    cabinE105 was selected.
    my database table for the cabin is as follows:
    create table cabin (
    cruise_id number primary key,
    cabinE105 number,
    cabinD113 number,
    cabinC131 number,
    cabinB127 number,
    cabinA101 number,
    FOREIGN KEY(cruise_id)
    REFERENCES cruisedetails(cruise_id)
    In the cruise details page im running the following code to update the cabin tables cabinE105 value to 0:
    String cabin = request.getParameter("cabin_id");
    String setCabin = "update cabin set '"+cabin+'" = 0 where cruise_id = 1";
    What im trying to do is pass the value of the cabin into the update statement so it updates cabinE105 = 0 where cruise_id = 1.
    How do I dfo this as the above method is not working ??
    I would like any help on this PLEASE !!! THANKS !

    String cabinID = request.getParameter("cabin_id");
    PreparedStatement ps=connection.prepareStatement("update cabin set "+cabinID+"=? where cruise_id=?");
    ps.setInt(1,0);
    ps.setInt(2,0);
    ps.executeUpdate();
    .Regards
    -John-

  • Passing an argument in the SQL Query of a View Object

    Hi,
    It is possible that this question has been asked before, however I have searched for a half an hour in the forums and couldn't find a solution.
    I am also new to using JDeveloper and ADF. Here's the situation:
    I am developing an application that doesn't have to do anything else then displaying data from a database. Pretty straightforward actually.
    Now I have made a vew pages with several collapsible panels (af:showDetailHeader) and have setup the datasources (or so I thought).
    All that remains is:
    - drag & drop a view object, from the application module that I created, onto the collabsible panels, so a child element gets created which displays data from the database.
    - hack the layout so it looks like I want it to.
    The problem that I have is the following:
    I am using a 'User'-class that contains values I need when quering the database.
    That User-object is part of a user-session.
    What I want, for example, is to use the 'getPersonId()' function of that User-object and pass the argument to a SQL-query of a certain view-object.
    The query would become something like:
    'SELECT * FROM people WHERE people.personId = :someNumber'.
    Now I've read some stuff about variable binding, which is complemented by something like (backing bean code):
    getDBTransaction().getRootApplicationModule().getACertainViewObject().setWhereClauseParameter(1, user.getPersonId());
    The examples I have found that might match my wishes are not using business components, but EJB's. I am having difficulty with understanding the 'how'-part of variable binding.
    Also, I do not know enough of ADF to be able to create a situation like:
    'User loads page, collapsible panel 1 is fully shown, the others are undisclosed.'
    (meaning, that for panel1 a query has been executed.)
    'User clicks on collapsible panel 2 which triggers a backingbean that somehow retrieves data from a view object'.
    I would appreciate any help that somebody can give.
    If it is not too much of a problem, please provide code snippets in case you have a solution. I am new to ADF :(.
    -edit
    I am using JDeveloper 10.1.3.3.0 in case that is of any importance.
    Message was edited by:
    Hugo Boog

    Hello Stijn,
    I didn't think about a referenced bean rule in the faces-config.
    I added it right away and I am now able to set parameters of a View-object, not using a page button and before the page loads. You made my day!
    In case anyone ever reads this post again, the summary of how to generate a table based on a View-object using dynamic parameters.:
    1a: Go to faces-config.xml -> Overview tab'
    1b: Go to the menuitem "Referenced Beans"
    1c: Click on 'new' and select the existing bean you want to access data from and input a name. In this example I use name="user"
    2: Create a View-object using the wizard.
    2a: Specify the query you want in the menuitem 'SQL Statement'.
    Add the 'parameters' you want to. You will have something like:
    "SELECT * FROM someTable WHERE table.columnname LIKE :someArgument".
    - hint: if you want the result to become something like:
    "SELECT * FROM someTable WHERE table.columnname LIKE '%someArgument%'" then you have to add the '%'-characters in your code itself (read: someClass.setParameter("%" + someArgument);).
    2b: In the menuitem 'Bind Variables' you have to add the variables you are referring to in the query. If you look at the query in 2a, then you have to add a variable with name "someArgument".
    2c: Add the View-object to a Application Module (create one if nessecairy).
    3a: Open a .jsp(x) file. Drag the View-object created in step 2 from the 'Data Controls'-pane to the page.
    3b: Click on the '+' of the View-object in the 'Data Controls'-pane and open 'Operations' and drag 'ExecuteWithParams' to your page as a button.
    3c: We do not want to use a button, the action has to be executed immediatly. So In the page source remove the lines that were created after dropping 'ExecuteWithParams'.
    3d: Right-click on the page and select "Go to Page Definition".
    3e: Go to the action id that is called 'ExecuteWithParams#', where # is a number.
    Change the id to something useful.
    3f: Change the NDValue so it corresponds with the value you want.
    Example:
    <action id="getAddressData" IterBinding="AddressesView1Iterator"
    InstanceName="MyHRServiceModuleDataControl.AddressView1"
    DataControl="MyHRServiceModuleDataControl" RequiresUpdateModel="true" Action="95">
    <NamedData NDName="someArgument" NDType="java.lang.String"
    NDValue="#{user.personId}"/>
    </action>
    Note: It is possible to use the value of a Backing Bean in NDValue.
    Note 2: user is the bean I referred to in the faces-config.xml!
    3g: Under the executables item, add an 'invokeAction' to pass the parameter to the View-object before your JSP-file loads:
    <executables>
    <invokeAction Binds="getAddressData"
    id="loadAddressDataOfPersonIdInSession"
    Refresh="prepareModel"/>
    Thank Stijn Haus for this :)

  • Pass the result of a SQL Query as table_name  for another SQL Query

    Hi All,
    How to pass the result of a SQL Query as parameter to another SQL Query
    Eg: I am doing the steps below.
    1) select distinct table_name as TAB1 from all_tab_cols where table_name like 'T_%' and column_name like '%XYZ'
    2) I want to pass the table_name from step 1 above as parameter to another query "select * from TAB1"
    Thanks

    Naveen B wrote:
    Hi All,
    How to pass the result of a SQL Query as parameter to another SQL Query
    Eg: I am doing the steps below.
    1) select distinct table_name as TAB1 from all_tab_cols where table_name like 'T_%' and column_name like '%XYZ'
    2) I want to pass the table_name from step 1 above as parameter to another query "select * from TAB1"
    ThanksYou should craete PL/SQL code with cursor which will accept a parameter and call that cursor inside the first one
    But if the first sql returns only one row, you can do it with simple sql code
    select * from (select distinct table_name as TAB1 from all_tab_cols where table_name like 'T_%' and column_name like '%XYZ')- - - - - - - - - - - - - - - - - - - - -
    Kamran Agayev A. (10g OCP)
    http://kamranagayev.wordpress.com
    [Step by Step install Oracle on Linux and Automate the installation using Shell Script |http://kamranagayev.wordpress.com/2009/05/01/step-by-step-installing-oracle-database-10g-release-2-on-linux-centos-and-automate-the-installation-using-linux-shell-script/]

  • String into java.sql.Date

    Can anyone tell me how to convert a String (yyyy-mm-dd) into a java.sql.Date format? Also I need to test to see if the Date of birth (entered in the format above) is >= 18.
    Can I do this in an SQL query?
    Thanks
    Marika Ludmann

    Can anyone tell me how to convert a String
    (yyyy-mm-dd) into a java.sql.Date format? Also I need
    to test to see if the Date of birth (entered in the
    format above) is >= 18.
    Can I do this in an SQL query?
    Thanks
    Marika LudmannTry this:
       String dateStr = "2003-04-29";
       SimpleDateFormat formater = new SimpleDateFormat("yyyy-MM-dd");
       Date result = formater.parse(dateStr);Don't forget to add the
    import java.text.SimpleDateFormat;

  • PLSQL and XMLTYPE -- Trying to pass cursor record into a XMLTYPE query.

    Hi all --
    I'm trying to pass records from a cursor into a xmltype query, with no success. If i hard code what the cursor record is, it works just fine, but when I use cursor_rec.value, I think it is taking that strin literally. Here is a simple example of what i'm trying to do.
    Brief Background -- I have two tables (OPLAN, OPLAN_SUB_CONT) with an XMLTYPE column. OPLAN contains the bulk/main XML with about 30 elemets, while OPLAN_SUB_CONT contains the xml files which either inserts or updates any of the 30 elements. Instead of hard coding 30 statments to check each element, I created a cursor to cycle through the possible elements. If an element exists i do something , if not i go the next element.
    This returns null, using elements_rec.element_name in the query...
    declare
    cursor cur_get_elements is
    select element_name
    from oplan_element_attribs
    where parent_element='Transactions'
    and element_name='OPLAN_STATUS';
    elements_rec cur_get_elements%rowtype;
    v_element number;
    begin
    for elements_rec in cur_get_elements
    Loop
    dbms_output.put_line ('before extract');
    select nvl(count(value(p)),0)
    into v_element
    from oplan_sub_content_xml oscx,
    table(xmlsequence(extract(SUBSCRIPTION_CONTENT,'Transactions/elements_rec.element_name'))) p;
    if v_element =0
    then dbms_output.put_line ('Element ' || elements_rec.element_name || ' is null');
    elsif v_element > 0
    then dbms_output.put_line ('Element ' || elements_rec.element_name || ' is not null');
    end if;
    end loop;
    end;
    SQL> /
    before extract
    Element OPLAN_STATUS is null
    PL/SQL procedure successfully completed.
    If i hard code the element_name (elements_rec.element_name) on line 16 (line wraps) to "OPLAN_STATUS' i get desired results ... returns not null
    declare
    cursor cur_get_elements is
    select element_name
    from oplan_element_attribs
    where parent_element='Transactions'
    and element_name='OPLAN_STATUS';
    elements_rec cur_get_elements%rowtype;
    v_element number;
    begin
    for elements_rec in cur_get_elements
    Loop
    dbms_output.put_line ('before extract');
    select nvl(count(value(p)),0)
    into v_element
    from oplan_sub_content_xml oscx,
    table(xmlsequence(extract(SUBSCRIPTION_CONTENT,'Transactions/OPLAN_STATUS'))) p;
    if v_element =0
    then dbms_output.put_line ('Element ' || elements_rec.element_name || ' is null');
    elsif v_element > 0
    then dbms_output.put_line ('Element ' || elements_rec.element_name || ' is not null');
    end if;
    end loop;
    end;
    SQL> /
    before extract
    Element OPLAN_STATUS is not null
    PL/SQL procedure successfully completed.
    Any ideas?
    Thanks!

    I should try everything before posting! Sorry, got it to work...
    replaced ..
    select nvl(count(value(p)),0)
    into v_element
    from oplan_sub_content_xml oscx,
    table(xmlsequence(extract(SUBSCRIPTION_CONTENT,'Transactions/elements_rec.element_name'))) p;
    with
    select nvl(count(value(p)),0)
    into v_element
    from oplan_sub_content_xml oscx,
    table(xmlsequence(extract(SUBSCRIPTION_CONTENT,'Transactions/' || elements_rec.element_name || ''))) p;

  • Need to return CLOB as String type from SQL query

    I have a table that contains a CLOB column, which should be accessible to a JDBC client (JReports) that does not understand how to extract CLOB from a result set.
    A possible workaround would be to translate the CLOB type into a normal string on the database side as part of the SQL query (or a view), so that the client can handle it. For that to work, we would need a type conversion within the query itself.
    Rather then
    SELECT clob_column FROM my_table
    we would need something like
    SELECT to_char(clob_column) FROM my table
    Unfortunately to_char does not work, but possibly there are other ways to achieve it.
    null

    Hi Christo
    Works fine. Just had to change the parameter order:
    DBMS_LOB.substr(clob_column,4000,1) converts the CLOB to a VARCHAR
    Thanks a lot,
    Thomas
    null

  • How to pass a variable for a SQL query in OLEDB source?

    Hi All,
    I am new to SSIS and working on it past few days. Can anyone please help me getting through a scenario where I need to pass a variable in the SQL statement in OLEDB source connection. Please find below for the details.
    eg:
    1) I have a SQL table with the columns SerialNumber, Name, IsValid, FileName with multiple rows.
    2) I have the file Name in a variable called Variable1.
    3) I want to read the data from my SQL table filtering based on the FileName (Variable1) within a data flow task and pull that data to the destination table.
    Question: In the data flow task, added source and destination DB connection with a script component in between to perform my validations. When trying to retrieve the data from source using the variable (i.e. SQL Query with variable), I am not able to add
    the query as the SQL statement box is disabled. How to filter the data based on the variable in the source DB ?
    Any help/suggestions would be of great help.
    Thanks,
    Sri

    Just to add with Vaibhav comment .
    SQL Command  : SQL query either with SQL variable or any condition  or simple Sql statement
    Like ;
    Select * from dimcustomer
    SQL Command using Varible :
    Sometimes we design our dynamic query in variable and directly use that variable name in oledb source.
    If you Sql query needs a condition based on SSIS variable .
    you can find a Example here :
    http://www.toadworld.com/platforms/sql-server/b/weblog/archive/2013/01/17/ssis-replace-dynamic-sql-with-variables.aspx
    http://www.select-sql.com/mssql/how-to-use-a-variable-inside-sql-in-ssis-data-flow-tasks.html
    Thanks
    Please Mark This As Answer or vote for Helpful Post if this helps you to solve your question/problem. http://techequation.com

  • Substitution strings in chart sql query

    Hi Guys,
    I am creating line charts and bar charts based on a query in HTML DB 1.5. I am using substitution strings in the query. Though I can use substitution strings in the line chart, I cannot do it in the bar chart. I am using almost the same sql query in both line and bar charts.
    The sql query in line chart is
    SELECT null, TO_CHAR(t1.extract_date, 'W-MON-YYYY') extractdate,
    MIN_OF_AVERAGES(AVG(&P40_METRICS.),:P40_REGION_LIST,:P40_SUBREGION_LIST,NULL,:P40_METRICS,'ind') orgid
    FROM ind t1,geography t2
    WHERE t1.country_id = t2.country_id(+)
    AND t2.region_name like
    DECODE(:P40_REGION_LIST,'ALL REGIONS','%',:P40_REGION_LIST)
    AND t2.subregion_name like
    NVL(:P40_SUBREGION_LIST,'%')
    GROUP BY TO_CHAR(extract_date, 'W-MON-YYYY')
    order by to_date(extractdate,'DD-MON-YY')
    The sql query in bar chart is
    SELECT null, TO_CHAR(t1.extract_date, 'W-MON-YYYY') extractdate,AVG(&P40_METRICS.) orgid
    FROM ind t1,geography t2
    WHERE t1.country_id = t2.country_id(+)
    AND t2.region_name like
    DECODE(:P40_REGION_LIST,'ALL REGIONS','%',:P40_REGION_LIST)
    AND t2.subregion_name like
    NVL(:P40_SUBREGION_LIST,'%')
    GROUP BY TO_CHAR(extract_date, 'W-MON-YYYY')
    order by to_date(extractdate,'DD-MON-YY')
    The min_of_averages function in the line chart query is some function I am calling. Even if I cut-paste the line chart query in the bar chart I get the error.
    The substitution string which is giving the problem is "&P40_METRICS."
    The error I am getting is
    Query cannot be parsed, please check the syntax of your query. (ORA-00909: invalid number of arguments)
    The only difference I see is that line chart query is inside a series and bar chart is not, does this make a difference??? Or is it because I am using the substitution string in choosing the column??? Please help!!!!
    Thanks,
    Swaroop

    Swaroop,
    You might be using an HTML bar chart and an SVG line chart, I can't tell, but their implementations differ. You won't be able to use a substitution string to replace a column name in the query in the situation you found, you'd have to figure out a way to construct the query string before it gets executed and I'm not sure the chart pages will let you do that.
    Scott

  • How to pass a parameter into a sql expression?

    How to pass a report parameter into a sql expression?

    Hi Donald,
        The functionality of using a parameter in a function is only available in the formula editor and not in SQL Expression. Parameters cannot be passed to the SQL Expression, the main purpose of the SQL Expression is to make use of Database functions to make calculations at the database level but the current functionality of the product only allows you to use Database fields.
    There is an article that talks on SQL Expressions and can be useful http://technicalsupport.businessobjects.com/KanisaSupportSite/search.do?cmd=displayKC&docType=kc&externalId=c2016184&sliceId=&dialogID=6018612&stateId=1%200%206020316
    Regards,
    Vinay

  • Convert string into java.sql.Date

    Hi,
    I want to convert a date in string form into java.sql.Date to persist into the database column with Date as its datatype in Oracle. I'm trying as follows:
    import java.sql.Date;
    import java.text.ParseException;
    import java.text.SimpleDateFormat;
    public class DateTest
    public static void main(String[] args)
    String strDate = "2002-07-16 14:45:01";
         System.out.println("strDate = "+strDate);
    Date aDate = null;
    try
    if(strDate != null && !strDate.trim().equals(""))
         SimpleDateFormat aSDF = new SimpleDateFormat();
         aSDF.applyPattern("yyyy-MM-dd hh:mm:ss");
         java.util.Date utilDate = aSDF.parse(strDate);
    System.out.println("utildate = "+utilDate);
         aDate = new Date(utilDate.getTime());
         aDate.setTime(utilDate.getTime());      
         System.out.println("aDate = "+aDate);
    catch (ParseException e)
    System.out.println("Unable to parse the date - "+strDate);
    catch (Exception ex)
    ex.printStackTrace();
    System.out.println("Caught Exception :"+ex.getMessage());
    It gives the output as :
    strDate = 2002-07-16 14:45:01
    utildate = Tue Jul 16 14:45:01 IST 2002
    aDate = 2002-07-16
    If I put this value into the database table, I can see only the date. Time part is missing. Is this the problem with java.sql.Date or Oracle datatype Date? Please help me asap.
    Thanks in advance.
    Regards,
    Rajapriya.R.

    If I put this value into the database table, I can
    see only the date. Time part is missing. Is this the
    problem with java.sql.Date or Oracle datatype Date?This is not a problem, this is the defined behaviour of the Date type. RTFAPI and have a look at Timestamp, while you're at it.

  • Can't pass a parameter to an SQL Query

    I've looked for about an hour or more now on the web, java.sun.com, but can't find what I need:
    I have a page called display.jsp, and I call it from the browser
    http://localhost/display.jsp?libnum=1
    In the page I have the following code:
    <sql:query var="profileQuery" dataSource="${profileDS}">
    SELECT * FROM singles.profile where libnum=?
    <sql:param value="${libnum}"/>
    </sql:query>
    However, the database sees the query as
    " SELECT * FROM singles.profile where libnum=null"
    So, my question is how do I make this line work ? :
    " <sql:param value="${libnum}"/> "
    can you help ?
    thanks !
    Dennis

    Dude .....
    Here's my code now -- solved it... phew..
    Just to think of it ... what a difference between "libnum" and "param.libnum". That was like 3-4, if not 5 hour difference for me.
    <sql:query var="profileQuery" dataSource="${profileDS}">
    SELECT * FROM singles.profile where libnum=?
    <sql:param value="${param.libnum}"/>
    </sql:query>
    Dennis

  • How do you pass a string into xml

    How do we pass a string to be parsed as xml
    something like
    DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
    oc = docBuilder.parse (String s);
    Thanks
    Arnold

    String xmlString = "<?xml version=\"1.0\"?>\n<myelement myattribute=\"myvalue\"/>\n";
    InputSource inputSource = new InputSource(new StringReader(xmlString));
    Document document = builder.parse(inputSource);

Maybe you are looking for