XPATH query behaves differently depending on presence of default namespace

I'm curious to know why an XPATH query seems to behave differently depending on whether the default namespace is present in the query.
My test case is as follows:
I use a table called xml_messages (id number, message xmltype) containing two rows - one where xmlns is specified and the other without.
1. Default namespace is specified:
<?xml version="1.0"?>
<Bereken xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Fout="false" Identifier="21-4-2008 12:55:02" xmlns="http://schemas.myco.nl/services/IPP">
<Reglementen>
<Reglement Ind="21000005" dlnsts="6">
<Producten>
<Product Ind="1002" ogr="27098.00" bbr="27098.00" igl="65" elt="130" pgs="63758.00" slt="65" plt="0" reg="0" orf="0" />
<Product Ind="1032" ogr="0" bbr="0" igl="65" elt="130" pgs="63758.00" slt="65" plt="0" reg="0" orf="0" />
<Product Ind="1052" ogr="0" bbr="0" igl="65" elt="130" pgs="63758.00" slt="65" plt="0" reg="0" orf="0" />
<Product Ind="1062" ogr="0" bbr="2389.968" igl="65" elt="130" pgs="63758.00" slt="65" plt="0" reg="0" orf="0" />
<Product Ind="3002" ogr="18968.00" bbr="5690.4" igl="0" elt="130" pgs="63758.00" slt="65" plt="0" reg="0" orf="0" />
<Product Ind="3032" ogr="0" bbr="0" igl="0" elt="130" pgs="63758.00" slt="65" plt="0" reg="0" orf="0" />
<Product Ind="3502" ogr="2845.00" bbr="2845.00" igl="65" elt="130" pgs="63758.00" slt="65" plt="0" reg="0" orf="0" />
<Product Ind="5002" ogr="3794.00" bbr="3794.00" igl="0" elt="18" pgs="63758.00" slt="65" plt="0" reg="0" orf="0" />
<Product Ind="7502" ogr="0" bbr="0" igl="65" elt="130" pgs="63758.00" slt="65" plt="0" reg="0" orf="0" />
<Product Ind="7503" ogr="0" bbr="0" igl="65" elt="130" pgs="63758.00" slt="65" plt="0" reg="0" orf="0" />
<Product Ind="8101" ogr="0" bbr="0" igl="65" elt="65" pgs="63758.00" slt="65" plt="0" reg="0" orf="0" />
<Product Ind="7002" ogr="0" bbr="8724.6" igl="65" elt="130" pgs="0" slt="65" plt="0" reg="0" orf="0" />
<Product Ind="7202" ogr="0" bbr="0" igl="65" elt="130" pgs="0" slt="65" plt="0" reg="0" orf="0" />
<Product Ind="7302" ogr="0" bbr="0" igl="65" elt="130" pgs="0" slt="65" plt="0" reg="0" orf="0" />
</Producten>
</Reglement>
</Reglementen>
<Parameters gbtd="1957-12-18T00:00:00.0000000+01:00" gsl="Vrouw" pdr="2008-03-01T00:00:00.0000000+01:00" hdgs="40000" ptp="100" />
</Bereken>
2. No default namespace specified:
<?xml version="1.0"?>
<Bereken xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Fout="false" Identifier="21-4-2008 12:55:02" >
<Reglementen>
<Reglement Ind="21000005" dlnsts="6">
<Producten>
<Product Ind="1002" ogr="27098.00" bbr="27098.00" igl="65" elt="130" pgs="63758.00" slt="65" plt="0" reg="0" orf="0" />
<Product Ind="1032" ogr="0" bbr="0" igl="65" elt="130" pgs="63758.00" slt="65" plt="0" reg="0" orf="0" />
<Product Ind="1052" ogr="0" bbr="0" igl="65" elt="130" pgs="63758.00" slt="65" plt="0" reg="0" orf="0" />
<Product Ind="1062" ogr="0" bbr="2389.968" igl="65" elt="130" pgs="63758.00" slt="65" plt="0" reg="0" orf="0" />
<Product Ind="3002" ogr="18968.00" bbr="5690.4" igl="0" elt="130" pgs="63758.00" slt="65" plt="0" reg="0" orf="0" />
<Product Ind="3032" ogr="0" bbr="0" igl="0" elt="130" pgs="63758.00" slt="65" plt="0" reg="0" orf="0" />
<Product Ind="3502" ogr="2845.00" bbr="2845.00" igl="65" elt="130" pgs="63758.00" slt="65" plt="0" reg="0" orf="0" />
<Product Ind="5002" ogr="3794.00" bbr="3794.00" igl="0" elt="18" pgs="63758.00" slt="65" plt="0" reg="0" orf="0" />
<Product Ind="7502" ogr="0" bbr="0" igl="65" elt="130" pgs="63758.00" slt="65" plt="0" reg="0" orf="0" />
<Product Ind="7503" ogr="0" bbr="0" igl="65" elt="130" pgs="63758.00" slt="65" plt="0" reg="0" orf="0" />
<Product Ind="8101" ogr="0" bbr="0" igl="65" elt="65" pgs="63758.00" slt="65" plt="0" reg="0" orf="0" />
<Product Ind="7002" ogr="0" bbr="8724.6" igl="65" elt="130" pgs="0" slt="65" plt="0" reg="0" orf="0" />
<Product Ind="7202" ogr="0" bbr="0" igl="65" elt="130" pgs="0" slt="65" plt="0" reg="0" orf="0" />
<Product Ind="7302" ogr="0" bbr="0" igl="65" elt="130" pgs="0" slt="65" plt="0" reg="0" orf="0" />
</Producten>
</Reglement>
</Reglementen>
<Parameters gbtd="1957-12-18T00:00:00.0000000+01:00" gsl="Vrouw" pdr="2008-03-01T00:00:00.0000000+01:00" hdgs="40000" ptp="100" />
</Bereken>
Next, I use the following two queries to get attribute values from the xml messages:
First query using xmlns:
select extractvalue(value(v),'/Product/@Ind' ) ind
, extractvalue(value(v),'/*/@Ind' ) ind2
from xml_messages f
, TABLE(XMLSequence( extract(f.message
     ,'/Bereken/Reglementen/Reglement/Producten/Product'
                              ,'xmlns="http://schemas.myco.nl/services/IPP"'
                              ))) v
where f.id = 1; -- Selects from the xmltype message that does have xmlns specified
This returns (as the first row)
IND IND2
____ 1002
^
|------ Nothing is returned by the XPATH /Product/@Ind
Second without using xmlns
select extractvalue(value(v),'/Product/@Ind' ) ind
, extractvalue(value(v),'/*/@Ind' ) ind2
from xml_messages f
, TABLE(XMLSequence( extract(f.message
     ,'/Bereken/Reglementen/Reglement/Producten/Product'
                              ))) v
where f.id = 2; -- Selects from the xmltype message that has no xmlns
This returns (as the first row)
IND IND2
1002 1002
According to XMLSpy, the correct XPATH to get the "Ind" attribute is "/Product/@Ind" so what I dont understand is why query one doesnt return any data when using a default namespace.
The XPATH "/*/@Ind" works in both cases and can be used as a workaround, but it seems less elegant than using the proper XPATH.
I've tried this test case in 9i and 10g, in sqlplus and TOAD, with the same results in all cases.
Can anyone provide some insight as to why this behavior occurs?

Thanks, A_Non,
adding the third parm to the extractvalue part of the query works.
ie:
select extractvalue(value(v),'/Product/@Ind', 'xmlns="http://schemas.myco.nl/services/IPP"' ) ind
, extractvalue(value(v),'/*/@Ind' ) ind2
from xml_messages f
, TABLE(XMLSequence( extract(f.message
     ,'/Bereken/Reglementen/Reglement/Producten/Product'
                              ,'xmlns="http://schemas.myco.nl/services/IPP"'
                              ))) v
where f.id = 1;               
I had not expected this because I thought the xml fragment returned by the extract didnt include the default namespace.
However, when looking at the query in more detail, its clear Oracle automatically includes the xmlns part in the returned xml fragment.
One of the rows in the xml fragment:
<Product xmlns="http://schemas.myco.nl/services/IPP" Ind="1002" ogr="27098.00" bbr="27098.00" igl="65" elt="130" pgs="63758.00" slt="65" plt="0" reg="0" orf="0"/>

Similar Messages

  • Copying Variables in BPEL using XPath Query

    Hi,
    I am new to BPEL and i want to know if it is possible to copy data from one variable to another using XPath Query in the <from> <to> tags, when the two variables are of different message types.
    I am trying to create a sample BPEL that would receive a String through the receive tag tied to one partner link (WSDl) and then invoke a different webservice using the <invoke> tag tied to another partner link (WSDL) by passing the received variable.
    I have pasted the BPEL File and the two WSDl files involved.
    My Issue is that when I send a soap request to the BPEL, it is passed as null to the webservice invoked.
    Probably because the copy tags don't work.
    Please help.
    BPEL File
    <!--
    ~ Licensed to the Apache Software Foundation (ASF) under one
    ~ or more contributor license agreements. See the NOTICE file
    ~ distributed with this work for additional information
    ~ regarding copyright ownership. The ASF licenses this file
    ~ to you under the Apache License, Version 2.0 (the
    ~ "License"); you may not use this file except in compliance
    ~ with the License. You may obtain a copy of the License at
    ~
    ~ http://www.apache.org/licenses/LICENSE-2.0
    ~
    ~ Unless required by applicable law or agreed to in writing,
    ~ software distributed under the License is distributed on an
    ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    ~ KIND, either express or implied. See the License for the
    ~ specific language governing permissions and limitations
    ~ under the License.
    -->
    <process name="HelloWorld2"
    targetNamespace="http://ode/bpel/unit-test"
    xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
    xmlns:tns="http://ode/bpel/unit-test"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:test="http://ode/bpel/unit-test.wsdl"
    xmlns:ns0="http://poc.com"
    queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"
    expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0">
    <import location="HelloWorld2.wsdl"
    namespace="http://ode/bpel/unit-test.wsdl"
    importType="http://schemas.xmlsoap.org/wsdl/" />
    <import location="sayHello.wsdl"
    namespace="http://poc.com"
    importType="http://schemas.xmlsoap.org/wsdl/" />
    <partnerLinks>
    <partnerLink name="helloPartnerLink"
    partnerLinkType="test:HelloPartnerLinkType"
    myRole="me" />
    <partnerLink name="sayHelloBPELPL"
    partnerLinkType="ns0:sayHelloPLT"
    partnerRole="you" initializePartnerRole="yes" />
    </partnerLinks>
    <variables>
    <variable name="myVar" messageType="test:HelloMessage"/>
    <variable name="tmpVar" messageType="test:HelloMessage"/>
    <variable name="inVar" messageType="ns0:sayHelloRequest"/>
    <variable name="outVar" messageType="ns0:sayHelloResponse"/>
    </variables>
    <sequence>
    <receive
    name="start"
    partnerLink="helloPartnerLink"
    portType="test:HelloPortType"
    operation="hello"
    variable="myVar"
    createInstance="yes"/>
    <assign name="ass1">
    <copy>
    <from variable = "myVar" part = "TestPart"/>
    <to variable = "inVar"
    part = "parameters"
    query= "/sayHello/ns0:param0" />
    </copy>
    </assign>
    <invoke partnerLink = "sayHelloBPELPL"
    portType = "ns0:sayHelloPortType"
    inputVariable = "inVar"
    operation = "sayHello"
    outputVariable = "outVar">
    </invoke>
    <assign name="ass2">
    <copy>
    <from variable = "outVar"
    part = "parameters"
    query= "/sayHelloResponse/ns0:return" />
    <to variable = "tmpVar" part="TestPart"/>
    </copy>
    </assign>
    <reply name="end"
    partnerLink="helloPartnerLink"
    portType="test:HelloPortType"
    operation="hello"
    variable="tmpVar"/>
    </sequence>
    </process>
    WSDL File1
    <?xml version="1.0" encoding="utf-8" ?>
    <!--
    ~ Licensed to the Apache Software Foundation (ASF) under one
    ~ or more contributor license agreements. See the NOTICE file
    ~ distributed with this work for additional information
    ~ regarding copyright ownership. The ASF licenses this file
    ~ to you under the Apache License, Version 2.0 (the
    ~ "License"); you may not use this file except in compliance
    ~ with the License. You may obtain a copy of the License at
    ~
    ~ http://www.apache.org/licenses/LICENSE-2.0
    ~
    ~ Unless required by applicable law or agreed to in writing,
    ~ software distributed under the License is distributed on an
    ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    ~ KIND, either express or implied. See the License for the
    ~ specific language governing permissions and limitations
    ~ under the License.
    -->
    <wsdl:definitions
    targetNamespace="http://ode/bpel/unit-test.wsdl"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:tns="http://ode/bpel/unit-test.wsdl"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
    xmlns:ns0="http://poc.com">
    <wsdl:message name="HelloMessage">
    <wsdl:part name="TestPart" type="xsd:string"/>
    </wsdl:message>
    <wsdl:portType name="HelloPortType">
    <wsdl:operation name="hello">
    <wsdl:input message="tns:HelloMessage" name="TestIn"/>
    <wsdl:output message="tns:HelloMessage" name="TestOut"/>
    </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="HelloSoapBinding" type="tns:HelloPortType">
    <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="hello">
    <soap:operation soapAction="" style="rpc"/>
    <wsdl:input>
    <soap:body
    namespace="http://ode/bpel/unit-test.wsdl"
    use="literal"/>
    </wsdl:input>
    <wsdl:output>
    <soap:body
    namespace="http://ode/bpel/unit-test.wsdl"
    use="literal"/>
    </wsdl:output>
    </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="HelloService">
    <wsdl:port name="HelloPort" binding="tns:HelloSoapBinding">
    <soap:address location="http://localhost:8082/ode/processes/helloWorld"/>
    </wsdl:port>
    </wsdl:service>
    <plnk:partnerLinkType name="HelloPartnerLinkType">
    <plnk:role name="me" portType="tns:HelloPortType"/>
    <plnk:role name="you" portType="tns:HelloPortType"/>
    </plnk:partnerLinkType>
    </wsdl:definitions>
    WSDL File 2
    <?xml version="1.0" encoding="UTF-8" ?>
    <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
    xmlns:ns0="http://poc.com"
    xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
    xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
    xmlns:ns1="http://org.apache.axis2/xsd"
    xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
    targetNamespace="http://poc.com">
    <wsdl:types>
    <xs:schema xmlns:ns="http://poc.com" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://poc.com">
    <xs:element name="sayHello">
    <xs:complexType>
    <xs:sequence>
    <xs:element minOccurs="0" name="param0" nillable="true" type="xs:string" />
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    <xs:element name="sayHelloResponse">
    <xs:complexType>
    <xs:sequence>
    <xs:element minOccurs="0" name="return" nillable="true" type="xs:string" />
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:schema>
    </wsdl:types>
    <wsdl:message name="sayHelloRequest">
    <wsdl:part name="parameters" element="ns0:sayHello" />
    </wsdl:message>
    <wsdl:message name="sayHelloResponse">
    <wsdl:part name="parameters" element="ns0:sayHelloResponse" />
    </wsdl:message>
    <wsdl:portType name="sayHelloPortType">
    <wsdl:operation name="sayHello">
    <wsdl:input message="ns0:sayHelloRequest" wsaw:Action="urn:sayHello" />
    <wsdl:output message="ns0:sayHelloResponse" wsaw:Action="urn:sayHelloResponse" />
    </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="sayHelloSOAP11Binding" type="ns0:sayHelloPortType">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="sayHello">
    <soap:operation soapAction="urn:sayHello" style="document"/>
    <wsdl:input>
    <soap:body use="literal" />
    </wsdl:input>
    <wsdl:output>
    <soap:body use="literal" />
    </wsdl:output>
    </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="sayHello">
    <wsdl:port name="sayHelloPort" binding="ns0:sayHelloSOAP11Binding">
    <soap:address location="http://localhost:8082/ode/processes/sayHello" />
    </wsdl:port>
    </wsdl:service>
    <plnk:partnerLinkType name="sayHelloPLT">
    <plnk:role name="me" portType="ns0:sayHelloPortType"/>
    <plnk:role name="you" portType="ns0:sayHelloPortType"/>
    </plnk:partnerLinkType>
    </wsdl:definitions>

    Hi,
    Yes, it very much is possible.
    Xpath query provides a lot many data type conversion functions(string to int, string to date etc), which can be used in copying variables.
    thanks
    Saurabh

  • Retrieve xml attribute value of nth xml node using xpath query

    I have an xml with following stucture...
    <xml>
    <header>
     <DocumentReference OrderId="order001">
     <DocumentReference OrderId="order002">
     <DocumentReference OrderId="order003">
    I have to loop through this xml and retrieve the orderId values inside Biztalk orchestration.
    In the expression shape, I get the count of 'DocumentReference' nodes using an xpath query and then
    Added a loopshape to make sure it loops thru all nodes
    Loop condition:   n<=nodeCount     (where n is an integer variable, n=0 to begin with, incremented by 1 thru each loop, nodeCount is # of DocumentReference nodes)
     I try retrieve to the orderId in the following expression shape using the below xpath query
      xpathQuery = System.String.Format("//*[local-name()='OrderReference'][{0}]/@orderID)",n);
      sOrderId = xpath(MsgSingleInvoice,xpathQuery);
    And I get the following exception:
    Inner exception: '//*[local-name()='OrderReference'][1]/@orderID)' has an invalid token.
    Exception type: XPathException
    Appreciate any help!   thanks!

    Thanks for the quick response. I got rid of it.
    And I see a different error:
    Inner exception: Specified cast is not valid. Exception type: InvalidCastException
    Source: Microsoft.XLANGs.Engine  
    Target Site: System.Object XPathLoad(Microsoft.XLANGs.Core.Part, System.String, System.Type)
    Since variable 'n' is of integer type, I suspected it and changed it to n.ToString() and tested again and still see the same error.

  • Insert Stmt behaving differently within a PL/SQL block than independently

    I have an INSERT INTO statement that is behaving different within a PL/SQL block than it does if ran as an independent SQL query. When executed within a PL/SQL block the INSERT statement does insert rows, but only less than 50% of the rows returned by the SELECT statement used by the INSERT. There are no constraints and the only check on the destination table is a NOT NULL for supplier_id column.
    BEGIN
        INSERT INTO suppliers (supplier_id, supplier_name)
        SELECT account_no, name FROM customers WHERE city = 'Newark';
    END;Can anyone help me with this?
    Thanks

    Thought this sounded familiar:
    INSERT INTO statement that is behaving different within a PL/SQL block

  • Code behaves differently when run in debugger

    var he:Array = handControl.getHumanInfo(ha, handNumber);
    while (he.length != 0)
    humanInfo.push(he.shift());
    This snippet is part of a large flash project I am working
    on. The program works fine by itself, but when I try to step
    through it in the debugger, it sometimes crashes, depending on
    where I put a breakpoint. If I put the breakpoint on the first line
    of code above, I can step into the function getHumanInfo(), trace
    it, and step back out, and everything is fine. But if I only put a
    breakpoint somewhere inside the getHumanInfo() function, all of a
    sudden when I step out of that function, the variable 'he' is
    undefined, and so the while loop never ends.
    This makes no sense to me. The code is either good or bad, it
    shouldn't behave differently based on where I put the breakpoint.
    The getHumanInfo() function always creates a new array and
    passes it back, so there is no reason 'he' should be undefined.
    This has happened many times when I've tried to use the flash
    CS3 debugger -- is there a known issue that this sounds like? I'm
    so fed up I'm ready to stop using the debugger altogether.

    I ran the program without the debugger and put some trace()
    statements in, just to make sure. Everything works fine without the
    debugger. So it seems to me it has to be a debugger issue. Has
    anyone heard of a similar issue?

  • Triggerring a query of different system from WAD template

    Hi,
    I have a WAD template that has a button. When I click on button, it should open a new window and a query from different SAP system should open for execution.
    For instance: The web template is built in QD system and the query to be executed is built in BD system.
    Is this possible in WAD?
    Best Regards,
    Pankaj

    Hello,
    I'm sorry but regarding your first question (about extra fees) i have no clue: it depends on the customer, its SAP system landscape, and even the sales rep... so I'm not sure you can find any response on this forum. The best you can do is contact the sales rep of the customer for which you're thinking about installing CRM Interactive reporting.
    And as far as configuration is concerned, I would check OSS: many notes are dealing about this subject. Check out application area CRM-ANA-OR:
    1146395       Configuring CRM Interactive Reporting
    1110780       FAQ for CRM Interactive Reporting
    Regards,
    Nicolas Busson

  • XPath query must be an absolute path in BPEL2.0 or only BPEL4WS?

    Hi,
    The 1st version of the BPEL4WS specifies that "For XPath 1.0, the value of the query attribute MUST be an absolute locationPath (with '/' meaning the root of the document fragment representing the entire part)." (under 14.3)
    But in BPEL 2.0 I cannot find this rule. I wonder if it is different in this version. Especially, can people write something like this:
    //street[@name='blabla']
    in the xPath query of an assign activity? or are there any important restrictions on using xPath query for a copy selection?
    Please help
    Thank you very much

    Ok, I've realised i mixed up my partitions. sda1 is with windows, sda3 is the extended one. So i changed rootnoverify(hd0,2) to rootnoverify(hd0,0)
    And it shows something entirely different now. For a blink of about 0.5 seconds, it shows:
    Booting 'Windows 7'
    rootnoverify (hd0,0)
    chainloader +1
    GRUB loading stage2...
    After that 0.5 seconds GRUB goes back to the "system select" screen, the countdown to the default choice goes again, and this whole process loops to eternity...
    Problem solved! Frankly speaking, I can't really know why. Everything was solved after I reinstalled both systems. The only difference was that the line makeactive was commented out, not deleted... And I think it is that.
    Last edited by matnik (2010-11-20 14:55:04)

  • Links to documents behave differently (ie11)

    I have an excel sheet , sheet.xlsx, in a sharepoint 2010 library,
    http://sharepoint, which is in trusted sites.
    I have an IE (11) favorite for that excel sheet.
    I have a desktop shortcut.url
    if I browse to http://sharepoint/library/AllItems.aspx, and click on the link for sheet.xlsx, Excel opens sheet.xls.
    if I click on the IE favorite for sheet.xlsx, I get the little yellow bar at the bottom of the screen asking me if I want to open it.
    if I click on the desktop shortcut for sheet.xls, I get the big white "View Downloads - Internet Explorer" pop-up window asking if I want to open it.
    I want all three of these methods to just open excel.  this is not just with excel documents, i'm only using it as an example. I assume this is a security setting in IE somewhere, but i'm looking at the GPO settings for my trusted sites zone, and nothing
    is set to "prompt." every setting is specifically enabled or disabled. I also find it curious that the behavior is different depending on how I open the document.
    i'll also mention that the users experiencing this issue were upgraded from ie8 to ie11 this week, and did not see this behavior in ie8 (which is why they are complaining about it now). the same IE security GPO was being applied to the users when they had
    IE8 that's being applied now that they have ie11.

    Hi,
    For your issue, you need to add some identification in front of the original address:
    For Excel file:
    ms-excel:ofv|u|http://sharepoint/Shared%20Documents/Sales.xlsx
    For Word file:
    ms-word:ofv|u|http://sharepoint/Shared%20Documents/Sales.docx
    For PowerPoint file:
    ms-powerpoint:ofv|u|http://sharepoint/Shared%20Documents/Sales.pptx
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • Need to return data from a query in different ways - Please help

    We are using 10g R2
    I have a proc as follows that has a query with over 100 values in the select clause:
    proc one( input param1, input_param2,.... output_cursor )
    as
    begin
    open cursor for
    select ...about 100 values with most of them being calculated
    from table1, view 1, table2, table 3, view 2 ...
    where ....
    and table1.col1 = input param1
    and table1.col2 = input param 2
    and view1.col5 = input param5...
    end;
    I need to return the data that comes from the above query in different formats, columns for a report would be different from columns for screen A and different for screen B. I need only certain columns for a report and different set of columns for another screen. I have wrapper procs that get different input params. From the wrapper procs I intend to call the above proc but would like only selected values.
    How can I accomplish this? Since my main goal is to select different columns for each wrapper I was thinking of insert the data from the above proc into global temp table and selecting whatever columns and order I want from the wrappers.
    What do you think? Any other solutions?
    Thanks
    Edited by: user565033 on Jan 21, 2013 7:50 PM

    You need to clearly separate roles and responsibilities. The PL/SQL code that creates and supplies a cursor handle is server code tasked to supply data. The code that makes the call for server data, is responsible for formatting and rendering that data.
    Thus moving data formatting into the server code needs to be question. Simple example. Cursor does not return invoice date as a date - but formats it into a string using TO_CHAR().
    This works for client1 - as that is the date format expected. However, client2 has different International settings and specifies a different date format. Invoice date, formatted into a string by the server, now renders in the wrong format on client2.
    Server code should not be concerned with rendering and formatting of data send to a client.
    As for the idea to use a global temp table is ..., well to put it nicely, it smells. Badly.
    The single most expensive operation on a database platform is I/O. And now you want to read server data and write it to temporary storage, and the read data from temporary storage to return to the client? What on earth for!? Why purposefully increase the size of the I/O workload? Why decrease performance and undermine scalability?
    Provide a proper abstraction interface to the client. Enable it to specify (as simplistically as possible) what it wants ito data. There are a number of ways to design and implement this in PL/SQL. Simplistic example:
    SQL> create or replace package Employees as
      2 
      3          EMP_FULL_DETAILS        constant integer := 1;
      4          EMP_BASIC_DETAILS       constant integer := 2;
      5 
      6          procedure GetEmpByID(
      7                  cur out sys_refcursor,
      8                  empID in emp.empno%type,
      9                  template in integer default EMP_BASIC_DETAILS
    10          );
    11 
    12          procedure GetEmpByName(
    13                  cur out sys_refcursor,
    14                  empName in emp.ename%type,
    15                  template in integer default EMP_BASIC_DETAILS
    16          );
    17  end;
    18  /
    Package created.
    SQL>
    SQL> create or replace package body Employees as
      2 
      3  type TArray is table of varchar2(32767);
      4 
      5  TemplateList       constant TArray :=
      6          new TArray(
      7                  'EMPNO, ENAME, JOB, MGR, HIREDATE, SAL, COMM, DEPTNO ',
      8                  'EMPNO, ENAME, JOB '
      9          );
    10 
    11  procedure GetEmpByID(
    12          cur out sys_refcursor,
    13          empID in emp.empno%type,
    14          template in integer default EMP_BASIC_DETAILS
    15  ) is
    16          sqlSelect       varchar2(32767);
    17  begin
    18          sqlSelect :=
    19                  'select '||TemplateList(template)||
    20                  'from emp where empno = :empID';
    21 
    22          open cur for sqlSelect using empID;
    23  end;
    24 
    25  procedure GetEmpByName(
    26          cur out sys_refcursor,
    27          empName in emp.ename%type,
    28          template in integer default EMP_BASIC_DETAILS
    29  ) is
    30          sqlSelect       varchar2(32767);
    31  begin
    32          sqlSelect :=
    33                  'select '||TemplateList(template)||
    34                  'from emp where ename like :empName';
    35          open cur for sqlSelect using empName;
    36  end;
    37 
    38 
    39  end;
    40  /
    Package body created.
    SQL>
    SQL> var c refcursor
    SQL>
    SQL> exec Employees.GetEmpByID( :c, 7499 );
    PL/SQL procedure successfully completed.
    SQL> print c
         EMPNO ENAME      JOB
          7499 ALLEN      SALESMAN
    SQL>
    SQL> exec Employees.GetEmpByName( :c, 'A%', Employees.EMP_FULL_DETAILS );
    PL/SQL procedure successfully completed.
    SQL> print c
         EMPNO ENAME      JOB               MGR HIREDATE                   SAL       COMM     DEPTNO
          7499 ALLEN      SALESMAN         7698 1981/02/20 00:00:00       1600        300         30
          7876 ADAMS      CLERK            7788 1987/05/23 00:00:00       1100                    20
    SQL>

  • Same query giving different results

    Hi
    I m surprised to see the behaviour of oracle. I have two different sessions for same scheema on same server. In both sessions same query returns different results. The query involves some calculations like sum and divisions on number field.
    I have imported this data from another server using export / import utility available with 9i server. Before export every thing was going fine. Is there some problem with this utility.
    I m using Developer 6i as the front end for my client server application. The behaviour of my application is very surprizing as once it shows the correct data and if I close the screen and reopen, it shows wrong data.
    I m really stucked with the abnormal behaviour. Please tell me the possiblities and corrective action for these conditions.
    Regards
    Asad.

    There is nothing uncommitted in both the sessions. But still different results are returned.
    I m sending u the exact query and result returned in both sessions.
    Session 1:
    SQL> rollback;
    Rollback complete.
    SQL> SELECT CC.CREDIT_HRS,GP.GRADE_PTS
    2 FROM GRADE G, COURSE_CODE CC, GRADE_POLICY GP
    3 WHERE G.COURSE_CDE=CC.COURSE_CDE
    4 AND G.SELECTION_ID=45 AND G.GRADE_TYP=GP.GRADE_TYP
    5 AND G.TERM_PROG_ID=17 AND GP.TERM_ID=14
    6 /
    CREDIT_HRS GRADE_PTS
    3 4
    4 3.33
    4 3.33
    3 4
    3 4
    3 4
    3 4
    7 rows selected.
    SQL>
    SESSION 2:
    SQL> rollback;
    Rollback complete.
    SQL> SELECT CC.CREDIT_HRS,GP.GRADE_PTS
    2 FROM GRADE G, COURSE_CODE CC, GRADE_POLICY GP
    3 WHERE G.COURSE_CDE=CC.COURSE_CDE
    4 AND G.SELECTION_ID=45 AND G.GRADE_TYP=GP.GRADE_TYP
    5 AND G.TERM_PROG_ID=17 AND GP.TERM_ID=14
    6 /
    CREDIT_HRS GRADE_PTS
    3 4
    4 3.33
    3 4
    3 4
    3 4
    3 4
    6 rows selected.
    SQL>
    U can see in session 1, seven rows are returned while in session 2 six rows are returned. I have issued a rollback before query to be sure that data in both sessions is same.

  • Sinlge select query in different schemas for same table(Indentical Structu)

    Scenario :
    Table XYZ is created in Schema A
    After an year, the old data from the previous year would be moved to different schema. However in the other schema the same table name would be used.
    For eg
    Schema A contains table XYZ with data of 2012 yr
    Schema B contains table XYZ with data of 2011 yr
    Table XYZ in both the schemas have identical structure.
    So can we fire a single select query to read the data from both the tables in effective way.
    Eg select * from XYZ where date range between 15-Oct-2011 to 15-Mar-2012.
    However the data resides in 2 different schema altogether.

    Thanks for the reply
    Creating an view is an option.
    But my problem, there is ORM layer(either Hibernate or Eclipse Top Link) between the application and the database.
    So the queries would be formed by the ORM layer and are not hand generated.
    So i cannot use view.
    So is there any option that would allow me to use single query on different schema's ?

  • The same code behaving different in two files.

    The same code behaving different in two files.
    in pro*c file it is returning rows
    in sql file it is not returning any rows.
    please suggest me.
    regards,
    prasad.

    please find the code.
    sql_stmt := 'SELECT rNum, dpcCode, sID, hDate, fBlock, '||
    'lBlock, recQty, fID, fName, ' ||
    'tSeqNo, sType, tDate, fStatCode, pDate, recCount, r ' ||
    'FROM (SELECT rownum rNum, DPC_CODE_ORIG dpcCode, ' ||
    'SENSOR_ID sID, ' ||
    'to_char(HEADER_DATE, ''YYYYMMDDHH24MISS'') hDate, ' ||
    'FIRST_BLOCK_NUMBER fBlock, ' ||
    'LAST_BLOCK_NUMBER lBlock, ' ||
    'RECORD_QUANTITY recQty, ' ||
    'FILE_ID fID, ' ||
    'substr(FILE_NAME,1,30) fName, ' ||
    'TRACE_SEQUENCE_NO tSeqNo, ' ||
    'SENSOR_TYPE sType, ' ||
    'to_char(TRAILER_DATE, ''YYYYMMDDHH24MISS'') tdate, ' ||
    'NVL(FILE_STATUS_CODE, ''NL'') fStatCode, ' ||
    'to_char(PROCESSED_DATE, ''YYYYMMDDHH24MISS'') pDate, '||
    'NVL(RECIRCULATE_COUNT,0) recCount, ' ||
    'ROW_NUMBER() ' ||
    'OVER(ORDER BY TRAILER_DATE DESC, LAST_BLOCK_NUMBER DESC) r ' ||
    'FROM logfc10t ' ||
    'WHERE DPC_CODE_ORIG = :IN_DPC_CODE ' ||
    'AND SENSOR_ID = :IN_SENSOR_ID ' ||
    'AND (((TRAILER_DATE <= TO_DATE(:IN_TRAILER_DATE, ''YYYYMMDDHH24MISS''))' ||
    ' AND (LAST_BLOCK_NUMBER < :IN_BLOCK_NUMBER)) ' ||
    ' OR (TRAILER_DATE < TO_DATE(:IN_TRAILER_DATE, ''YYYYMMDDHH24MISS'')))) ' ||
    'WHERE r = 1 ';

  • Pdf duplication in Preview for Mac behaving differently

    When duplicating a PDF in Preview for Mac, a new image window would open that I could click on to select, then rename and save elsewhere. Just recently, seems like in the last few days, Preview now behaves differently. Now when I select duplicate, a duplicate document is created in the same window but shows as a thumbnail in the sidebar. This is confusing as it appears that Preview is trying to create a duplicate of the document at the end of the original. I don't appear to have received any updates from Apple that would account for this sudden change in behaviour (shows Preview last modified 18th November). I don't appear to be able to change this in Preview's Preferences. Can I revert Preview to the previous behaviour? (I'm using latest version of Preview in Yosemite on a 24" iMac).

    I always find that Preview can garble certain graphic elements or even slightly alter the over-all color of the PDF. However, I also find it is a lot quicker to deal with PDFs, especially when it comes to printing. Sometimes I get a PDF that I send to print on our Canon copier and I end up canceling the print job after 10-15 minutes because it's still processing. I open that same PDF in Preview and it prints in less than a minute. The same can be said of InDesign so on certain jobs I end up exporting as a PDF and printing from Preview. This might say a lot about Adobe's Printing Engine... (sorry, off-topic)

  • Variable Picker generates invalid XPath query

    This one seems to be a bug:
    When declaring a variable of type "element" (not "messageType") and accessing the variable with the Variable Picker from within the assign assistant, i.e. the following line ist generated:
    bpws:getVariableData("testVar","","/tns:TaskMgrTestCaseRequest/tns:input")
    The BPEL process can be validated and deployed without an error.
    At runtime the following exception is generated:
    XPath expression failed to execute.
    Error while processing xpath expression, the expression is "bpws:getVariableData("testVar", "", "/tns:TaskMgrTestCaseRequest/tns:input")", the reason is XPath expression failed to execute.
    Error while processing xpath expression, the expression is "", the reason is Unexpected ''.
    Please verify the xpath query.
    Please verify the xpath query.
    When working with variables of type messageType, there is no problem. (So I declared a messageType to each element type ...)
    Wolfgang

    Thanks for the heads up. We will try to kill this bug in the 0.97 release. -Edwin

  • Why Reports format behaves different in Excel and browser(if desformat=html or pdf)?

    1-Why Reports format behaves different in Excel and browser(if desformat=html or pdf)?
    2-I made three queries Q1,Q2 & Q3 and linked them with proper field links but suppose Q3 returns no records for some Q1&Q2 records & when the report runs for delimited options it reflects only those records as output for which all the queries return records(if Q3 returns no record then the related records from queries Q1,Q2 don't reflect) while the output in desformat=html or pdf is ok..
    can you please resolve my problems
    ( I have installed patch 5a in my report server machine)
    Thanks & Regds.
    Suneel
    null

    What do you mean by "different"? (In our
    experience, Oracle html output has too many
    columns, which are not visible in the
    browser but are obvious in Excel.)
    We build our own html programmatically, so
    that Excel matches the browser more closely.
    -- Allan Plumb

Maybe you are looking for

  • Regarding Layout  of rtf report

    hi experts, line:--- level line :-- l1 l2 l3l l4 line: --- here in my layout i have a single cell which is divided into 2 rows: in 1 row i want to be print "LEVEL" as heading in 2 row i want its different level come . Please do needful for the same.

  • My computer does not start?

    I turn on my computer mac pro and it does not start...

  • Better to have temp tables or create/drop

    Greetings: This is a question more for the DBA types out there. Generally speaking, if you need a place to store temp. data from a forms application, is it better to have a temp table sitting out there all the time and just truncate it, or create/dro

  • How to fetch rows from a table like search engines do?

    Is it possible to fetch rows from a table like Google does? I want to fetch row number 20-40 after the select has ordered the rows. Pseudo code: select * from log where rownum > 20 and rownum < 40 order by date; Rownum doesn't work with ordering so I

  • Upgrading from old CS?

    I have CS on my 5 year old MacBook. I am not able to upload the software to my new MacBook Pro due to the newer processor.  If I want to upgrade the software, what should I buy?