URL constructor for XML query

I can't seem to construct an http SQL query correctly using the Java URL constructor. When I enter the following string in the browser window, everything works fine:
"http://aaaa.bbb.ccc.com/nwind?sql=select * from employees for xml auto&root=root". The results of the query are displayed in the browser window. I would like to get this to work using the URL and URLConnection classes. It seems I always get some sort of error with a response length of -1. I would appreciate any insight into this problem. Thanks for your help.
Paul J. Lay
[email protected]

Thanks for your prompt reply. I tried your suggestion immediately. It didn't change the results. I still get a response length of -1. You can actually try this yourself by keying in a browser window the following string: www.itsmagical.com/nwind?sql=select * from employees for xml auto&root=root. I can't imagine what the problem could be. Thanks again for your prompt reply.
Best Regards,
Paul J. Lay

Similar Messages

  • Passing file location as URL parameter for xml query

    Hi all,
    A quick question regarding using a parameter to set the source URL in an XML query template.
    When assigning the URL, the static text works perfectly eg:
    //<servername>/<folder>/samplefile.xml . The xml is returned as required.
    However, we wish to call this from a BLS txn and set the source URL dynamically.
    To test this we assigned //<servername>/<folder>/samplefile.xml to Parameter no 1 and insert [Param.1] in the source URL field. No luck.
    Any suggestions?
    Cheers
    Mark

    Mark,
    In BLS, the double slashes (escaping the single /) are only necessary if you are building the full http url string in the link editor.
    If your XMLQuery template is something like http://localhost/Folder/Subfolder/[Param.1] then put in a default param value in the query template and make sure the query test works.  Then configure (or reconfigure) this in your BLS transaction and generate the sample results.  All you should have to do in BLS then is to assign your Transaction or Local property to the Param.1 link in your XMLQuery action block.  All of the dynamic replacement and subsequent xml file retrieval should then be done by the XMLQuery itself.
    If you can keep the majority of the URL in the XMLQuery itself and then just dynamically pass it the Param.1 piece it will be very easy to test and configure (also use localhost if the file lives on the xMII web server), but if you have to build the string external in BLS I would recommend using a combination of the expression editor and a Local property.  If the Local string property contains the base of http://localhost/Folder/Subfolder/ (no quotes or character escaping needed for the default value of a string property) then just assign something like the following to your Param.1 property of the XMLQuery:  Local.URLBase & "filename.xml" (a simple evaluate will confirm your efforts).
    Regards,
    Jeremy

  • No method found for XML query element

    Hi,
    I have an EJB module which contains some entity beans.
    If I try to deploy it or verify it using the Sun One Verifier Tool I get the following exception...
    Error: ** Error trying to process file: java.lang.RuntimeException: No method found for XML query element: Ambiguous or invalid <query-method>
    java.lang.RuntimeException: No method found for XML query element: Ambiguous or invalid <query-method>
    at com.sun.enterprise.deployment.xml.EjbNode.parseQueries(EjbNode.java:700)
    at com.sun.enterprise.deployment.xml.EjbNode.completeLoadingDescriptor(EjbNode.java:671)
    at com.sun.enterprise.deployment.xml.EjbBundleNode.completeLoadingDescriptor(EjbBundleNode.java:524)
    at com.iplanet.ias.deployment.EjbBundleXmlReader.load(EjbBundleXmlReader.java:249)
    at com.iplanet.ias.deployment.EjbBundleXmlReader.loadStdAloneModule(EjbBundleXmlReader.java:162)
    at com.sun.enterprise.tools.verifier.Verifier.openEjbJar(Verifier.java:2421)
    at com.sun.enterprise.tools.verifier.Verifier.loadEjbJar(Verifier.java:1318)
    at com.sun.enterprise.tools.verifier.Verifier.loadJar(Verifier.java:866)
    at com.sun.enterprise.tools.verifier.gui.MainPanel.run(MainPanel.java:187)
    at java.lang.Thread.run(Thread.java:536)
    Look in file "EntityBeans.jar_verified.xml" for detailed results on test assertions.
    This problem can be resolved by un-installing the IDE, removing my user directory, and re-installing the IDE (I am using SunOne Studio 5 SE Update 1). The problem is that it returns with alarming regularity.
    Anyone else experiencing this? Any help would be much appreciated.

    Sometimes, but not always, this exception appears in the ide.log before the error first occurs.
    com.sun.forte4j.j2ee.packaging.PackagingIOException: package/EntityBeans.ejbjar
         at com.sun.forte4j.j2ee.packaging.PackagingUtil.writeJarFile(PackagingUtil.java:403)
         at com.sun.forte4j.j2ee.packaging.PackagingUtil.writeJarFile(PackagingUtil.java:67)
         at com.sun.forte4j.j2ee.ejbmodule.EJBModuleDataObject.writeEJBJar(EJBModuleDataObject.java:2673)
         at com.iplanet.ias.tools.forte.verifier.VerifierAction.performAction(VerifierAction.java:63)
         at org.openide.util.actions.NodeAction$DelegateAction.actionPerformed(NodeAction.java:431)
         at org.netbeans.core.ModuleActions$1.run(ModuleActions.java:97)
         at org.openide.util.Task.run(Task.java:136)
         at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:328)
         at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:670)

  • URL syntex for XML queries

    Hi all,
    I am using MII 12.1 and facing a problem with xml query url syntex.
    suppose my project folder name is "X" and my tag query name is "Y"
    so what is the syntex of url url in XML query for above query?
    Edited by: Manoj Bilthare on Jul 28, 2009 11:39 AM

    Dear Jeremy,
    Path: ActivePortal-->ActivePortalMonitor
    Actually in active portal there is a transaction "ActivePortalMonitor" by which we can insert data for alert log and metrics.
    So in Metrics there are some formula to calculate metrics which we defined in "metric editor".
    I need to use "calculated columns" action block for these metric calculation and this action comes under "XML functions "
    thats why i require XML Query in case of tag query.
    It may be that i am not able to explain you clearly so for better understanding please refer
    "ActivePortal-->ActivePortalMonitor.trx" in "active portal" project.

  • Use of Global Properties in URL path of XML Query

    I am trying to use global properties to define the URL of XML query:
    Globals.ImageFilePath&"SomePath/\File.xml"
    but it does not like it. If I put the content of the Globals.ImageFilePath it works fine. What is the synatax for that?
    I am using the XML query in a transaction within an image creation action block. When I try to define the URL parameter of the XML file as a link, it is not taken on account, and the image created has no data (it is empty). The URL is taken when defined on the Cofigure Object screen, but there I have the same problem to use the global variable parameter.
    Any suggestions?
    Thanks,
    Vlad
    Edited by: Vladimir Baltchev on Jul 29, 2008 11:33 PM
    Edited by: Vladimir Baltchev on Jul 29, 2008 11:40 PM

    As I mentioned in my first posting, yes, I can put the global variable of the link editor for the URL parameter, it evaluates well, but it is not taken on account by the query, and the image generated is empty. Obviously there is a bug here, so I am trying to find a work around to use the global variable on the Configure Object screen, where the parameter URL is taken by the XML query, but on this screen I can not use the global variable. It works only if I put the content of the global variable.
    So, does anybody know if we can use global variables on a Configure Object  screen, or on the XML query URL field, and if so, what is the syntax to indicate global variable?
    Thanks again,
    Vlad

  • URL Parameterizing for BI Query Detail Drill Down via Xcelsius

    Hi Guys,
    I am In the process of building an Xcelsius dashboard using BI/BW as my source system, working on a "Details" URL button to allow the user to drill directly into the source BI queries with their current combo box selections. 
    I am trying to build a URL to pass a value to both a variable and to filter a characteristic. I want to pass a value to a 0fiscper variable and exclude an employee number. 
    I have been able to get each URL to work independently, but not working together. If I leave out either the variable part or the filter part it works, but it doesn't work with both the filter portion and characteristic filter section. 
    I followed other threads and used Web application designer (WAD) instructions to view the XHTML I will have to parametrize for my URL.
    This is how I have flattened/parametrized it
    Variable part:
    BI_COMMAND_1-BI_COMMAND_TYPE=SET_VARIABLES_STATE&
    BI_COMMAND_1-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE_TYPE=VARIABLE_INPUT_STRING&
    BI_COMMAND_1-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE_TYPE-VARIABLE_INPUT_STRING=010/2010&
    BI_COMMAND_1-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE=BCURFPER&
    data provider part
    BI_COMMAND_1-BI_COMMAND_TYPE=SET_SELECTION_STATE&
    BI_COMMAND_1-TARGET_DATA_PROVIDER_REF_LIST-TARGET_DATA_PROVIDER_REF_1=DP_1&
    characteristic filter part
    BI_COMMAND_1-CHARACTERISTICS_SELECTIONS-CHARACTERISTIC_SELECTIONS_1-CHARACTERISTIC=0EMPLOYEE&
    BI_COMMAND_1-CHARACTERISTICS_SELECTIONS-CHARACTERISTIC_SELECTIONS_1-SELECTIONS-SELECTION_1-SELECTION_INPUT_STRING=!201
    So my complete URL is:
    http://serverinfo?
    QUERY=ABCQUERY&
    BI_COMMAND_1-BI_COMMAND_TYPE=SET_VARIABLES_STATE&
    BI_COMMAND_1-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE_TYPE=VARIABLE_INPUT_STRING&
    BI_COMMAND_1-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE_TYPE-VARIABLE_INPUT_STRING=010/2010&
    BI_COMMAND_1-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE=BCURFPER&
    BI_COMMAND_1-BI_COMMAND_TYPE=SET_SELECTION_STATE&
    BI_COMMAND_1-TARGET_DATA_PROVIDER_REF_LIST-TARGET_DATA_PROVIDER_REF_1=DP_1&
    BI_COMMAND_1-CHARACTERISTICS_SELECTIONS-CHARACTERISTIC_SELECTIONS_1-CHARACTERISTIC=0EMPLOYEE&
    BI_COMMAND_1-CHARACTERISTICS_SELECTIONS-CHARACTERISTIC_SELECTIONS_1-SELECTIONS-SELECTION_1-SELECTION_INPUT_STRING=!201
    Then it gives me the following error when I attempt to run this...
    " The metadata of "CMD" "SET_VARIABLES_STATE" are incorrect for parameter "CHARACTERISTICS_SELECTIONS"
    If I set the debug=x flag to see what is generated in the error this is the info I get:
    The parameter "CHARACTERISTICS_SELECTIONS" in the metadata of "CMD" "SET_VARIABLES_STATE is not correctly defined:
    <parameterList>
      <param name="BI_COMMAND_TYPE" value="SET_VARIABLES_STATE"/>
      <param name="CHARACTERISTICS_SELECTIONS">
        <param name="CHARACTERISTIC_SELECTIONS" index="1">
          <param name="CHARACTERISTIC" value="0EMPLOYEE"/>
          <param name="SELECTIONS">
            <param name="SELECTION" modification_type="delete_if_value_not_equal" index="1">
              <param name="SELECTION_INPUT_STRING" value="!201"/>
            </param>
          </param>
        </param>
      </param>
      <param name="TARGET_DATA_PROVIDER_REF_LIST">
        <param name="TARGET_DATA_PROVIDER_REF" value="DP_1" index="1"/>
      </param>
      <param name="TARGET_VARIABLE_CONTAINER_REF" value="DEFAULT"/>
      <param name="VARIABLE_VALUES">
        <param name="VARIABLE_VALUE" index="1">
          <param name="VARIABLE" value="BCURFPER"/>
          <param name="VARIABLE_TYPE" value="VARIABLE_INPUT_STRING" modification_type="delete_if_value_not_equal">
            <param name="VARIABLE_INPUT_STRING" value="010/2010"/>
          </param>
        </param>
      </param>
    </parameterList>
    Thanks for looking!
    -Gary

    Hi Gary,
    We came across the following issue.Colud you please provide the solution which you used to resolve it.
    " The metadata of "CMD" "SET_ITEM_PARAMETERS" are incorrect for parameter "BUTTON_LIST".
    Thanks,
    Anji

  • Create URL Document for text only string (Not XML)

    I want to query a http page that return only a string of text. The response is not formatted with XML. Is it possible to read the value of “parameter1” containing “4321” from the Contact Center Express script?
    Response (pure text):
    parameter1=4321&parameter2=1234

    Getting the response body of an HTTP GET request is as easy as:
    Set my_string = URL[http://my-server.local/]
    Now, if the response body is formatted as a query string:  key1=value1&key2=value2, you will need to further process your results.
    You can feel free to search the web for "java query string" to see if there's code out there you like, otherwise, here's one way to do it in UCCX.
    /* This Set step makes the HTTP GET request to the web server and stores the response body in the String */
    Set my_string = URL[http://my-server.local/]
    /* This Do step takes any size query parameter and turns it into a HashMap */
    /* E.g., From this: key1=value1&key2=value2; to this: map[key1] = value1, map[key2] = value2 */
    Do {
        String[] pairs = my_string.split("&");
        int i = 0;
        int j = pairs.length;
        for (; i < j; i++) {
            my_map.put(pairs[i].split("=")[0], pairs[i].split("=")[1]);
    }/* This If step checks the existance of a specific key, and if it exists, we get the value for use in our script */If (my_map.containsKey("key1"))     True          /* The specified key is in the map, set account_number to its value */          Set account_number = (String) my_map.get("key1");     False          /* The specified key is not in the map */
    I hope that makes sense and helps you.  Ask questions if you need more help.  Good luck.
    Anthony Holloway
    Please use the star ratings to help drive great content to the top of searches.

  • Passing parameters for a query throught XML and capturing response in the same

    Hi All,
    I have defined a RequestParameters object and i am passing paramerts for a query through XML and trying to capture the result in the same and send back to the source. In this case i am send XML from excel.
    Below is my XML format.
    <?xml version="1.0" encoding="utf-8"?>
    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
    <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <Insert xmlns="http://tempuri.org/">
    <dataContractValue>
    <dsRequest>
    <dsRequest>
    <SOURCE></SOURCE>
    <ACTION>Insert</ACTION>
    <RequestParams>
    <RequestParams>
    <ACC_NO>52451</ACC_NO>
    <EMP_CITY>HYD</EMP_CITY>
    <EMP_NAME>RAKESH</EMP_NAME>
    <EMP_CONTACT>99664</EMP_CONTACT>
    <EMP_JOM>NOV</EMP_JOM>
    <EMP_SALARY>12345</EMP_SALARY>
    </RequestParams>
    <RequestParams>
    <ACC_NO>52452</ACC_NO>
    <EMP_CITY>HYD</EMP_CITY>
    <EMP_NAME>RAKESH</EMP_NAME>
    <EMP_CONTACT>99664</EMP_CONTACT>
    <EMP_JOM>NOV</EMP_JOM>
    <EMP_SALARY>12345</EMP_SALARY>
    </RequestParams>
    </RequestParams>
    </dsRequest>
    <dsRequest>
    <SOURCE></SOURCE>
    <ACTION>Update</ACTION>
    <RequestParams>
    <RequestParams>
    <ACC_NO>52449</ACC_NO>
    <EMP_CITY>HYD1</EMP_CITY>
    <EMP_NAME>RAKESH1</EMP_NAME>
    <EMP_SALARY>1345</EMP_SALARY>
    </RequestParams>
    <RequestParams>
    <ACC_NO>52450</ACC_NO>
    <EMP_CITY>HYDer</EMP_CITY>
    <EMP_NAME>RAKEH</EMP_NAME>
    <EMP_SALARY>1235</EMP_SALARY>
    </RequestParams>
    </RequestParams>
    </dsRequest>
    </dsRequest>
    </dataContractValue>
    </Insert>
    </s:Body>
    </s:Envelope>
     Where i have a List of dsRequest and RequestParams, where i can send any number of requests for Insert,Update. I have two a XML element defined in RequestParams "RowsEffected","error" where the result will be caputred and is updated
    to the response XML.
    I have 6 defined in RequestParams
    EMP_SALARY(int),ACC_NO(int),EMP_CITY(string),EMP_NAME(string),EMP_CONTACT(string),EMP_JOM(string)
    My Question is:
    When i am trying to build response XML with the following code, the parameters which are not given in the Request XML are also appearing in the Response.
                    ResponseParams.Add(
    newdsResponse()
                        ACTION = OriginalParams[a].ACTION,
                        SOURCE = OriginalParams[a].SOURCE,
                        Manager = OriginalParams[a].Manager,
                        RequestParams = OriginalParams[a].RequestParams
    Where the OriginalParams is dsRequest
    Ex: In my update query i will only send three parameters, but in my response building with ablove code, i am getting all the variables defined as INT in the RequestParameters.
    Is there any way i can avoid this and build response with only the parameters given in the Request ??
    Appreciate ur help..Thanks
    Cronsey.

    Hi Kristin,
    My project is, User will be giving the parameters in the excel, and using VBA, the values are captured and an XML is created in the above mentioned format and is send to web service for the Insert/Update.
    I created a webservice which reads the values from <datacontract> and it consist of list of <dsRequests> where any number of Insert/Upate commands can be executed, with in which it contains a list of <RequestParams> for multiple insertion/Updation.
    //function call
    OriginalParams = generator.Function(query, OriginalParams);
    where OriginalParams is List<dsRequest>
    //inside function
    command.Parameters.Add()// parameters adding
    int
    val = command.ExecuteNonQuery();
    after the execution,an XML element is added for the response part.and it is looped for all the RequestParams.
    OriginalParams[i].Result.Add(
    newResult()
    { ERROR = "No Error",
    ROWS_EFFECTEFD = 1 });
    //once all the execution is done the response building part
    for(inta
    = 0; a < OriginalParams.Count; a++)
                    ResponseParams.Add(
    newdsResponse()
                      Result = OriginalParams[a].Result
    QUEST: When i am trying to build response XML with the following code, the parameters which are not given in the Request XML are also appearing in the Response.
    Ex: In my update query i will only send three parameters, but in my response building with ablove code, i am getting all the variables defined as INT in the RequestParameters.
    Is there any way i can avoid this and build response with only the parameters given in the Request ??
    Appreciate ur help..Thanks
    Cronsey.

  • Execute SQL Task - FOR XML PATH query error

    I have the following query
    SELECT pl.Id,
    pl.StartTime,
    pl.EndTime,
    pl.PackageName,
    pl.Computer,
    pl.Operator,
    CASE WHEN (CHARINDEX('stack trace', pl.ErrorDescription) > 0) Then
        SUBSTRING(pl.ErrorDescription, 0, CHARINDEX('stack trace', pl.ErrorDescription))
        ELSE
        pl.ErrorDescription
        END as ErrorDescription
    ISNULL(ErrorFile,'') as ErrorFile,
    'Not Applicable' as SourceSystem
    FROM etl.PackageLog as pl
    WHERE pl.Processed = 0
    ORDER BY pl.StartTime, pl.PackageName
    FOR XML PATH('Row'), ROOT(N'FieldingCounts')
    in a Execute SQL Task and i get the following error:
    [Execute SQL Task] Error: Executing the query "SELECT pl.Id,
    pl.StartTime,
    pl.EndTime,
    pl.Package..." failed with the following error: "An invalid character was found in text content.
    ". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
    The query execute without problem in database and in the ssis package doens't run because of the column
    CASE WHEN (CHARINDEX('stack trace', pl.ErrorDescription) > 0) Then
        SUBSTRING(pl.ErrorDescription, 0, CHARINDEX('stack trace', pl.ErrorDescription))
        ELSE
        pl.ErrorDescription
        END as ErrorDescription
    Any help to overcome the problem?
    Thanks

    Hi,
    It looks like that you must be trying to set the result of the query to some variable from the Execute SQL Task. If yes, make sure that the target variable is of the correct data type where XML string  can fit into. Considering that in SSIS, we have
    some limit for XML strings.
    Please let me know if it doesn't help.
    Thanks,
    Nimit

  • Query language for XML documents

    Which is a better (efficiency in terms of memory management) query language for interacting with XML documents.The query language shouls support 'insert', 'delete', 'update' and 'select' commands. How fast is database as compared to XML ( database being replaced by XML) when only 'insert' n 'select' commands are issued?

    Hi,
    I suggest you use the Sunopsis JDBC for XML driver that will let you perform all kind of SQL statements on your XML files. It is a type 4 driver so it's very use to use. You may have more information and download it here:
    http://www.sunopsis.com/corporate/us/products/jdbcforxml/
    Hope that will help
    Simo Fernandez

  • Query language for XML that is going to remove use of database

    Friends,
    I want to know whether my idea is feasible or not.
    I want to make a query language similar to SQL for XML which is going to remove the need for database for a large extent.
    Their will be queries for making table,extracting data,making foreign key all through XML and no database.
    I just want to know that is their any market value for such a project and will it be sellable,so that i can start working on it.

    There is no way to judge any future market for such a thing.
    As it is, XML is widely abused, having mutated from its original purpose, a markup language readable by both machine and human, to a general data interchange language. It winds up being extremely slow and convoluted, in some cases overwhelming the hardware when a simple and common error occurs, then having to catch up. A big part of this is the silly and redundant method of defining metadata, again and again and again and again.
    So what you want to do is create a database which will be highly formatted with redundant information, dynamically. This is silly, why does data need to be stored in a human readable format? It doesn't always even need to be presented in a human readable format! Why the heck would you need to read the bits of an mp4? Steganography?
    What you are proposing is the exact opposite of what is needed. What is needed is a way to describe metadata for many different kinds of data, in a manner that can be interpreted by both man and machine at appropriate times, extensible for various paradigms.
    What can be sold, on the other hand, is another question entirely, and not technical at all.
    First definition of database that pops up during a search: an organized body of related information
    Why would you want to get rid of that?

  • Query for xml:id fails

    Hello,
    I have a problem querying for the id-Attribute. I guess the solution is simple but I just don't get it %). Could someone give me a hint on that?
    Xml-Snippet
    &lt;s xml:id="s100" n="s99"/&gt;
    I can successfully query the document for the sentence //s&#091;@xml:id="s100"&#093;
    I can also query for the n-Attribute: //s/@n
    But when I want to query for the xml:id attribute I get no results (and no error): //s/@xml:id
    //s/@id does not work either.
    What am I doing wrong?
    Best wishes,
    Peter
    Edited by: user524194 on Nov 17, 2009 1:10 AM
    Edited by: user524194 on Nov 17, 2009 1:11 AM

    Hi Peter,
    I'm afraid I'm not sure what's going on. You'll need to answer a few more questions:
    1) What indexes do you have?
    2) What storage and indexing model are you using (document or node)?
    3) What is the full query that you're using?
    4) What's the query plan for your query?
    5) Can you reproduce the problem with a minimal data set via the DB XML shell?
    John

  • Different row count for select versus insert in XML query

    Hi,
    I encounter a situation where a SELECT * returns a different rows count than an INSERT INTO... (SELECT *) by xmltable join. This makes no sense at all!!!
    In breif, I tried to convert xml data into traditional relational tables. I wrote an xml query to select data from xmltable... I checked row count. When I used "create table as select" that was the same query above, I got correct row count. However when I used "insert into select" that was the same query above, I got the wrong info in the table I just inserted.
    Does any one have any idea what caused this issue? Thanks for your help.

    DUPLICATE post
    count of rows in a schema tables

  • FOR XML will not run in stored procedure but will in Query

    The following is the Query and stored procedure for a XML export.  The query runs find and returns a clickable link. The stored procedure does not.
    Stored Procedure
    USE [db]
    declare @XmlOutput1 xml
    set @XmlOutput1 =
    (SELECT incident_num,
    unit_id, unit_status_datetime,
    unit_status_remarks
    FROM unit_status_hist
    where convert(varchar,unit_status_datetime,102)
    =
    convert(varchar,getdate(),102)
    FOR XML
    RAW)
    select @XmlOutput1
    Query:
    use db
    SELECT incident_num, unit_id,
    unit_status_datetime,  unit_status_remarks
    FROM unit_status_hist
    WHERE  convert(varchar,unit_status_datetime,102)
    =
    convert(varchar,getdate(),102)
    for XML
    auto, Elements
    Any help would be greatly appreciated.  Thank you.

    The following is the Query and stored procedure for a XML export.  The query runs find and returns a clickable link. The stored procedure does not.
    Stored Procedure
    USE [db]
    declare @XmlOutput1 xml
    set @XmlOutput1 =
    (SELECT incident_num,
    unit_id, unit_status_datetime,
    unit_status_remarks
    FROM unit_status_hist
    where convert(varchar,unit_status_datetime,102)
    =
    convert(varchar,getdate(),102)
    FOR XML
    RAW)
    select @XmlOutput1
    Query:
    use db
    SELECT incident_num, unit_id,
    unit_status_datetime,  unit_status_remarks
    FROM unit_status_hist
    WHERE  convert(varchar,unit_status_datetime,102)
    =
    convert(varchar,getdate(),102)
    for XML
    auto, Elements
    Any help would be greatly appreciated.  Thank you.
    I cant see any stored procedure here
    both of the code posted are queries only
    also clickable link will come in only SSMS query window. Are you trying to execute this from some application?
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Aliases for XML nested query

    Hi,
    I am generating a XML file from a stored procedure based on a select statement like this:
    ctx := dbms_xmlgen.newcontext('SELECT CURSOR(SELECT t1.cntbtch, rownum cntitem, t1.idvend, t1.idinvc,
    CURSOR (SELECT batch_number cntbtch, 20 * rownum cntline FROM t2) as AP0022,
    CURSOR (SELECT batch_number cntbtch, invoice_date_cdo datedue from t3) as AP0023
    FROM t1) as AP0021
    FROM dual');
    dbms_xmlgen.setrowsettag(ctx, 'DataSet');
    dbms_xmlgen.setrowtag(ctx, 'AP0020');
    The result is:
    <?xml version="1.0" ?>
    - <DataSet>
    - <AP0020>
    - <AP0021>
    - <AP0021_ROW>
    <CNTBTCH>GL000003</CNTBTCH>
    <CNTITEM>1</CNTITEM>
    <IDVEND>1919</IDVEND>
    <IDINVC>3354033</IDINVC>
    - <AP0022>
    - <AP0022_ROW>
    <CNTBTCH>GL000003</CNTBTCH>
    <CNTLINE>20</CNTLINE>
    </AP0022_ROW>
    </AP0022>
    - <AP0023>
    - <AP0023_ROW>
    <CNTBTCH>GL000003</CNTBTCH>
    <DATEDUE>06-JAN-06</DATEDUE>
    </AP0023_ROW>
    </AP0023>
    </AP0021_ROW>
    I would like NOT to show <AP0021>, <AP0022> and <AP0023> rowtags, but instead <AP0021_ROW>, <AP0022_ROW> , <AP0023_ROW> to show as <AP0021>, <AP0022> , <AP0023>
    How can I get this?
    Thank you,
    Monica

    Hi,
    It looks like that you must be trying to set the result of the query to some variable from the Execute SQL Task. If yes, make sure that the target variable is of the correct data type where XML string  can fit into. Considering that in SSIS, we have
    some limit for XML strings.
    Please let me know if it doesn't help.
    Thanks,
    Nimit

Maybe you are looking for

  • Blue screens when playing games

    hello people I bought not long ago the msi  K8T Neo-FIS2R   It worked great and i got good benchmarkresults. But when i installed battlefield 1942 and played it , it would give me a blue screen wich says:  he would dump his memory. i installed the la

  • LDAP web search not working on AD LDS instance

    Hello all ! Let me explain the goal before the problem : We need to setup a directory service in our DMZ so our web portal can provide an address book without having to connect to the AD. We setup (this is all in the lab environment for now) an AD LD

  • Loading zeroes to Essbase

    Is it possible, when loading to Essbase to make it so all zeroes go in a #Missing? I tried to create a script, but the zeroes still do not load. Is there a setting I need to turn on to allow for this?

  • Photoshop elements 11 et fichiers Raw

    Bonjour, Photoshop elements 11 ne semble pas savoir lire le format des fichiers Raws Olympus (.ORF) alors qu'il est dans la liste des formats qui sont reconnus en importation sur ce site! Idem pour le logiciel DNG converter qui est censé convertir le

  • Where do I find standard IViews for MDM

    In MDM SP03 there are available a set of standard iViews for MDM. I am not able to find them on SDN. Can someone tell me where to find them? Regards John-Kjell