SDO_FILTER / SDO_RELATE - no rows returned

Hi, I'm having some troubles with SDO_FILTER and SDO_RELATE functions.
I inserted some spatial data into a table and I can see that spatial information in mapbuilder, but when I query de same data with SQL command line, there are no rows returned. The spatial data isn't georeferenced.
I used this SQL query:
SELECT g.GEOM.Get_WKT() FROM SHPSDO2 g
WHERE sdo_filter(g.GEOM, mdsys.sdo_geometry(2003,NULL,NULL,
mdsys.sdo_elem_info_array(1,1003,3),
mdsys.sdo_ordinate_array(-180, 180, -90, 90)),
'querytype=window') = 'TRUE';
and also this one:
SELECT g.GEOM.Get_WKT() FROM SHPSDO2 g
WHERE SDO_RELATE(g.GEOM, mdsys.sdo_geometry(2003,NULL,NULL,
mdsys.sdo_elem_info_array(1,1003,3),
mdsys.sdo_ordinate_array(-180, 180, -90, 90)),
'mask=ANYINTERACT querytype=WINDOW') = 'TRUE';
When I execute this query: SELECT SDO_AGGR_MBR(g.GEOM).Get_WKT() FROM SHPSDO2 g
the following row is returned:
POLYGON ((-179.144806 -14.60521, 179.76416 -14.60521, 179.76416 71.332649, -179.144806 71.332649, -179.144806 -14.60521))
That means the data is inside the GEOMETRY filter that I passed.
Can some one help me please ???
Operator
Thanks in advance

when using an optimized rectangle enter lower left x,y, then upper right x,y (or long/lat).
so change:
mdsys.sdo_geometry(2003,NULL,NULL,
mdsys.sdo_elem_info_array(1,1003,3),
mdsys.sdo_ordinate_array(-180, 180, -90, 90))
to:
mdsys.sdo_geometry(2003,NULL,NULL,
mdsys.sdo_elem_info_array(1,1003,3),
mdsys.sdo_ordinate_array(-180, -90, 180, 90)),

Similar Messages

  • How to Customize the Message "No Row Returned" from a Report

    Hi,
    I've been trying to customize the Message "No Row Returned" from a Report.
    First i followed the instructions in Note:183131.1 -
    How to Customize the Message "No Row Returned" from a Report
    But of course the OWA_UTIL.REDIRECT_URL in this solution did not work (in a portlet) and i found the metalink document 228620.1 which described how to fix it.
    So i followed the "fix" in the document above and now my output is,..
    "Portlet 38,70711 responded with content-type text/plain when the client was requesting content-type text/html"
    So i search in Metalink for the above and come up with,...
    Bug 3548276 PORTLET X,Y RESPONDED WITH CONTENT-TYPE TEXT/PLAIN INSTEAD OF TEXT/HTML
    And i've read it and read it and read it and read it and can't make heads or tails of what it's saying.
    Every "solution" seems to cause another problem that i have to fix. And all i want to do is customize the Message "No Row Returned" from a Report. Please,...does anyone know how to do this?

    My guess is that it only shows the number of rows it has retrieved. I believe the defailt is for it to only retrieve 50 rows and as you page through your report it retrieves more. So this would just tell you how many rows was retireved, but probably not how many rows the report would contain if you pages to the end. Oracle doesn't really have a notion of total number of rows until the whole result set has been materialized.

  • [Forum FAQ] How do I send multiple rows returned by Execute SQL Task as Email content in SQL Server Integration Services?

    Question:
    There is a scenario that users want to send multiple rows returned by Execute SQL Task as Email content to send to someone. With Execute SQL Task, the Full result set is used when the query returns multiple rows, it must map to a variable of the Object data
    type, then the return result is a rowset object, so we cannot directly send the result variable as Email content. Is there a way that we can extract the table row values that are stored in the Object variable as Email content to send to someone?
    Answer:
    To achieve this requirement, we can use a Foreach Loop container to extract the table row values that are stored in the Object variable into package variables, then use a Script Task to write the data stored in packages variables to a variable, and then set
    the variable as MessageSource in the Send Mail Task. 
    Add four variables in the package as below:
    Double-click the Execute SQL Task to open the Execute SQL Task Editor, then change the ResultSet property to “Full result set”. Assuming that the SQL Statement like below:
    SELECT   Category, CntRecords
    FROM         [table_name]
    In the Result Set pane, add a result like below (please note that we must use 0 as the result set name when the result set type is Full result set):
    Drag a Foreach Loop Container connects to the Execute SQL Task. 
    Double-click the Foreach Loop Container to open the Foreach Loop Editor, in the Collection tab, change the Enumerator to Foreach ADO Enumerator, then select User:result as ADO object source variable.
    Click the Variable Mappings pane, add two Variables as below:
    Drag a Script Task within the Foreach Loop Container.
    The C# code that can be used only in SSIS 2008 and above in Script Task as below:
    public void Main()
       // TODO: Add your code here
                Variables varCollection = null;
                string message = string.Empty;
                Dts.VariableDispenser.LockForWrite("User::Message");
                Dts.VariableDispenser.LockForWrite("User::Category");
                Dts.VariableDispenser.LockForWrite("User::CntRecords");     
                Dts.VariableDispenser.GetVariables(ref varCollection);
                //Format the query result with tab delimiters
                message = string.Format("{0}\t{1}\n",
                                            varCollection["User::Category"].Value,
                                            varCollection["User::CntRecords"].Value
               varCollection["User::Message"].Value = varCollection["User::Message"].Value + message;   
               Dts.TaskResult = (int)ScriptResults.Success;
    The VB code that can be used only in SSIS 2005 and above in Script Task as below, please note that in SSIS 2005, we should
    change PrecompileScriptIntoBinaryCode property to False and Run64BitRuntime property to False
    Public Sub Main()
            ' Add your code here
            Dim varCollection As Variables = Nothing
            Dim message As String = String.Empty
            Dts.VariableDispenser.LockForWrite("User::Message")
            Dts.VariableDispenser.LockForWrite("User::Category")
            Dts.VariableDispenser.LockForWrite("User::CntRecords")
            Dts.VariableDispenser.GetVariables(varCollection)
            'Format the query result with tab delimiters
            message = String.Format("{0}" & vbTab & "{1}" & vbLf, varCollection("User::Category").Value, varCollection("User::CntRecords").Value)
            varCollection("User::Message").Value = DirectCast(varCollection("User::Message").Value,String) + message
            Dts.TaskResult = ScriptResults.Success
    End Sub
    Drag Send Mail Task to Control Flow pane and connect it to Foreach Loop Container.
    Double-click the Send Mail Task to specify the appropriate settings, then in the Expressions tab, use the Message variable as the MessageSource Property as below:
    The final design surface like below:
    References:
    Result Sets in the Execute SQL Task
    Applies to:
    Integration Services 2005
    Integration Services 2008
    Integration Services 2008 R2
    Integration Services 2012
    Integration Services 2014
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

    Thanks,
    Is this a supported scenario, or does it use unsupported features?
    For example, can we call exec [ReportServer].dbo.AddEvent @EventType='TimedSubscription', @EventData='b64ce7ec-d598-45cd-bbc2-ea202e0c129d'
    in a supported way?
    Thanks! Josh

  • How to get number of rows return in SELECT query

    i'm very new in java, i have a question:
    - How to get number of rows return in SELECT query?
    (i use SQL Server 2000 Driver for JDBC and everything are done, i only want to know problems above)
    Thanks.

    make the result set scroll insensitve, do rs.last(), get the row num, and call rs.beforeFirst(), then you can process the result set like you currently do.
             String sql = "select * from testing";
             PreparedStatement ps =
              con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
             ResultSet rs = ps.executeQuery();
             rs.last();
             System.out.println("Row count = " + rs.getRow());
             rs.beforeFirst();~Tim
    NOTE: Ugly, but does the trick.

  • How to restrict number of rows returned in a query

    Hi frnds,
    I'd like to restrict number of rows returned by my query to some 10 rows. how to do that.When I try doing with the rownum<10 its giving results for a particular dept and that too some 6 rows only...btw I'm grouping my table and includes joins from many a table and am ordering the table results by a column.. How to do this..

    776317 wrote:
    Hi frnds,
    I'd like to restrict number of rows returned by my query to some 10 rows. how to do that.When I try doing with the rownum<10 its giving results for a particular dept and that too some 6 rows only...btw I'm grouping my table and includes joins from many a table and am ordering the table results by a column.. How to do this..
    TELL ME HOW MANY ROWS YOU HAVE IN TABLE?
    Because you have only *6 rows* in you column, if you less than 10 rows then it displays only containied/exist rows. nothing much
    select ename,empno from emp where rownum < 10;Thanks

  • Restrict number of rows returned in a report

    Hi All
    Does anyone know how to restrict the number of rows returned in a report eg. I want to do a couple of reports based on opportunities/products and return only the top 5 or 10???
    Thanks
    Gail

    Sorry just answered my own question by using the 'is in top' colum filter!

  • How to get the number of rows returned by a report?

    Hi,
    I'm developing my first application in APEX and so far everything seems fine, except I can't figure out this very simple thing: I have a report based on a PL/SQL block returning an SQL string. I'd like to have a message (something like "X rows returned") just before the report. The closest thing I could find was "X to Y out of Z" in the pagination styles, but that's not what I want. Also I don't think running the same query to get COUNT() is wise.
    Any help would be appreciated.
    Thanks,
    Konstantin

    My guess is that it only shows the number of rows it has retrieved. I believe the defailt is for it to only retrieve 50 rows and as you page through your report it retrieves more. So this would just tell you how many rows was retireved, but probably not how many rows the report would contain if you pages to the end. Oracle doesn't really have a notion of total number of rows until the whole result set has been materialized.

  • How can I limit the number of rows returned by a select stat

    How can I limit the number of rows returned by a select
    statement. I have a query where I return the number of stores
    that are located in a given area.. I only want to return the
    first twenty-five stores. In some instances there may be over
    200 stores in a given location.
    I know is SQL 7 that I can set the pagesize to be 25....
    Anything similiar in Oracle 8i?
    null

    Debbie (guest) wrote:
    : Chad Nale (guest) wrote:
    : : How can I limit the number of rows returned by a select
    : : statement. I have a query where I return the number of
    : stores
    : : that are located in a given area.. I only want to return the
    : : first twenty-five stores. In some instances there may be
    : over
    : : 200 stores in a given location.
    : : I know is SQL 7 that I can set the pagesize to be 25....
    : : Anything similiar in Oracle 8i?
    : If you are in Sql*Plus, you could add the statement
    : WHERE rownum <= 25
    : Used together with an appropriate ORDER BY you
    : could get the first 25 stores.
    Watch out. ROWNUM is run before ORDER BY so this would only
    order the 25 selected
    null

  • Inserting static text in between rows returned from a pivot table

    Is there a way to type static text (eg. “Note that the data for Land has an accuracy of 98%”) in between rows returned from the dataset in the rtf template. The alternative would be to break the BI analysis report (which is the source of the template data) into 2 parts and then insert each part into the template one below the other with the text typed in between.

    Oracle support has confirmed that this requirement is not possible to implement

  • Af:commandButton only works for the first 10 rows returned in the af:table

    Using JDeveloper 10.1.3.2.0.
    I am new to ADF programming. I have attempted to create an ADF page that contains a search and return table in the same page. The search appears to work fine but the return table displays odd behavior. If the search returns more than 10 rows such that it is possible to page forward through the rows returned the command button associated with the return table that allows the user to pick a particular row and navigate to another page does not work. If the user finds what he/she is looking for in the first ten rows then the command button works fine and the user is taken to the next page. The command button is actually defined to have an af:setActionListener to set a value in a backing bean and then command button has an action to invoke a backing bean. Both of these fire just fine if the selection is made from the first 10 rows. However once the user pages forward to another set of rows then neither seem to happen. Any advice on where to figure out what I did wrong?

    When I get a component that seems to do nothing under certain circumstances, the first thing I usually check for is Javascript errors. Sometimes errors on page load can keep a component's Javascript from firing properly.
    Try reproducing your problem in Firefox (or another browser with a decent Javascript error console; IE doesn't have one, although I think you can get extensions that provide JS debugging). Check the error console:
    # Before scrolling off the first 10 rows.
    # Right after scrolling off the first 10 rows.
    # After unsuccessfully clicking the command button.
    Do any interesting errors show up in steps 2 or 3?

  • Calling a stored procedure for each row returned

    I need to call a stored procedure for each row returned by a repeating frame. I called the stored procedure from the repeating frame format trigger, but that did not work( it did no populated the tables populated by the stored procedure)
    How can I call a stored procedure for each row returned by a repeating frame.
    Thank you

    Include it as a formula column in your data model.

  • How to get total number of rows return by query

    hi all
    i am using forms 6i with oracle 10G in windows environment....
    i have a tabular form now i want to know that how many rows return by the query...like when user click on enter query and then give any search criteria and then execute query..it displays the records but i want to count the records that how many rows are return.............
    hope you understant what i mean
    Thanks in advance
    Regards

    U can use
    "Select count(*) from <table> where <condition>"
    <condition> is the where clause being used during "Execute Query"
    this will give u the no of records in query.
    And second option is to take a summary column. whose function is set "COUNT" and
    "Summarized item" should contain a column that will never be blank. After execute query this column will give u no of records in block.
    Regards....

  • Can I limit the number of rows returned on a Select?

    Can I limit the number of rows returned on a Select statement? I would be using JDBC in a Java program.

    Use Java prepared statements with the equivalent of this SQL*plus script:
    VARIABLE n number
    EXEC :n := 3;
    SELECT rownum FROM all_objects WHERE rownum <= :n;
        ROWNUM
             1
             2
             3
    EXEC :n := 5;
    SELECT rownum FROM all_objects WHERE rownum <= :n;
        ROWNUM
             1
             2
             3
             4
             5

  • Oracle XMLTable function no rows returned

    I have a following xml document stored in XML type table
    <?xml version="1.0" encoding="utf-8"?>
    <Document xmlns="urn:iso:std:iso:200:tech:xsd:101" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <FIToFICstmrCdtTrf xmlns="urn:iso:std:iso:200:tech:xsd:101">
                                <CreditTx>
                    <PaymentID>
                        <InstrumentId>AAB000001</InstrumentId>
                        <Id>4730 2013-10-23 AAB000001</Id>
                        <TranxId>BULKTTXTDAAB000001</TranxId>
                    </PaymentID>
                </CreditTx>
            </FIToFICstmrCdtTrf>
    </Document>
    And i am trying to select
    I am on Oracle Version 11.2.0.3SELECT payments.txid,
    payments.endtoendid,
    payments. instrid
    FROM payment_load_xml,
    XMLTable('for $i in /Document/FIToFICstmrCdtTrf/CdtTrfTxInf/PmtId
    return $i'
    PASSING OBJECT_VALUE
    COLUMNS
    instrid VARCHAR2(20) PATH 'InstrId' ,
    endtoendid VARCHAR2(20) PATH 'EndToEndId' ,
    txid VARCHAR2(20) PATH 'TxId'
    )payments
    I am getting no rows returned any ideas please

    The document has a default namespace, so you have to declare it :
    SELECT payments.txid, 
           payments.endtoendid, 
           payments. instrid 
    FROM payment_load_xml, 
         XMLTable(
          XMLNamespaces(default 'urn:iso:std:iso:200:tech:xsd:101') ,
           'for $i in /Document/FIToFICstmrCdtTrf/CdtTrfTxInf/PmtId 
            return $i' 
           PASSING OBJECT_VALUE 
           COLUMNS 
             instrid    VARCHAR2(20) PATH 'InstrId' , 
             endtoendid VARCHAR2(20) PATH 'EndToEndId' , 
             txid       VARCHAR2(20) PATH 'TxId' 
    ) payments ;
    and additionally, your paths don't point to anything in the sample document.

  • Repeating frame with no rows returned messing up display

    I have a repeating frame nested within a frame among other items. When there are no rows returned for the repeating frame query, the report is shifting all the objects below the repeating frame upward in the page. How do I get the space held by the repeating frame to just stay blank if no rows are returned?

    Hi:
    Is the Image and the Text within a Frame?If not, put these within a frame. If the text still moves up, then use an anchor.
    what I mean is if your report looks like this:
    <REGULAR FRAME>
    <REPEATING-FRAME>
    TEXT1
    IMAGE
    <REGULAR FRAME>
    TEXT2
    then put the TEXT1 and IMAGE inside a FRAME.
    HTH
    Srini Ramanujam.

Maybe you are looking for

  • NBA CHANNELS????

    Please tell me that Fios will be getting NBA League Pass or at least the NBA channel before the **bleep** season is over.  I am a die hard NBA fan who recently traded in her Directv NBA League Pass for Verizon Fios.  I love verizon, but a big piece o

  • Patch 105591 not installing -11 ?

    Hi - I installed patch 105591 on my Sparc and it doesn't appear to have installed the 11 part which means that bug 4466915 is bothering me. As you can see from the readme that bug is included in 11. (from 105591-11) 4423447 improvements in <string> i

  • LDAP-SAP

    Hi All, I m looking for data retrival form SAP HR and from LDAP server....compare them and then update the LDAP server directory with the sap HR data.. i have created a RFC destination... but not able to access LDAP server... or get data from LDAP se

  • How to remove padding from lightbox

    There seems to be a natural amount of padding when making a lightbox.  How can I edit that amount of padding so that I may have a full bleed lightbox?

  • APXWS_MAX_ROW_CNT

    Hi All, I am using Apex version 4.1 and Oracle DB 11g. We are using Interactive reports on some pages and the following thing is taking the most time while loading. -->IR binding: "APXWS_MAX_ROW_CNT" value="100000" Could you please let me know how do