Problems with basic spatial query

I'm trying to learn Oracle Spatial working with 11g R2 and with 3D georeferenced data (specifically data describing buildings in a city).
But I'm having trouble getting a basic query to work on my dataset (it works for the book example), and I'm trying to do it exactly the way it's done in the Spatial Developer's Guide for 11g.
To learn how spatial queries work, I set up the cola_markets tables used in the documentation, made the appropriate manual entry in the user_sdo_geom_metadata view and created the index. Having done that, I can run the following simple query (as well as the others in the manual) on the book tables:
SELECT SDO_GEOM.SDO_DISTANCE(c_b.shape, c_d.shape, 0.005)
FROM cola_markets c_b, cola_markets c_d
WHERE c_b.name = 'cola_b' AND c_d.name = 'cola_d';
but when I try to do the same thing on my own tables (created from citygml data), I get an error. There is the difference that the data is 3D, and the index was created without any PARAMETERS ( ... ), hence is just 2D. But still I don't get why the following query doesn't work:
SELECT SDO_GEOM.SDO_DISTANCE(c_w.envelope, c_b.envelope, 0.0005)
FROM cityobject c_w,
cityobject c_b
WHERE c_w.id = 50025
AND c_b.id = 50018;
The id's for the buildings are valid, and I used the same tolerance used by the software that set up the database.
Here's the error I get in SQL developer:
ORA-29532: Java call terminated by uncaught Java exception: java.lang.Exception: 54535
ORA-06512: at "MDSYS.SDO_3GL", line 637
ORA-06512: at "MDSYS.SDO_GEOM", line 1973
ORA-06512: at "MDSYS.SDO_GEOM", line 1990
29532. 00000 - "Java call terminated by uncaught Java exception: %s"
*Cause: A Java exception or error was signaled and could not be
resolved by the Java code.
*Action: Modify Java code, if this behavior is not intended.
So, thinking it might have something to do with the fact that it's a Java interface, I also tried running it from SQL/PL command line and get essentially the same thing:
ERROR at line 1:
ORA-29532: Java call terminated by uncaught Java exception:
java.lang.Exception: 54535
ORA-06512: at "MDSYS.SDO_3GL", line 637
ORA-06512: at "MDSYS.SDO_GEOM", line 1973
ORA-06512: at "MDSYS.SDO_GEOM", line 1990
Any ideas why this isn't working?

Hi,-
There are many ways to model a building with our open 3D data model:
Please note that each polygon can be any planar surface as long as you dont use
shortcut definitions like axis-aligned box as Siva mentioned. We dont allow curved surfaces in 3D.
Gtype 3003 can be composite surface which means each polygon should be connected to another polygon with an edge. Etype must be then 1006. You can have as many polygons as possible as long as they are connected.
Gtype 3003 can also be a single polygon. But, this will not be able to model a building.
As you pointed out, maybe it is the footprint of the building.
You can also model building with gtype 3008 which is simple or composite solid.
Etype 1007 means it is simple solid and etype 1008 means it is composite solid.
Composite solid has one or more solids which has at least one full or partial common surface in between.
In your case with single polygon, you can use sdo_util.extrude as follows to make
3D buildings. The surfaces created will be on the out-side surface of the building.
You will not have walls inside the building when you use this following function:
SELECT SDO_UTIL.EXTRUDE(
  SDO_GEOMETRY(
    2003,
    null,
    null,
    SDO_ELEM_INFO_ARRAY(1,1003,1),
    SDO_ORDINATE_ARRAY(5, 1,8,1,8,6,5,7,5,1)),
  SDO_NUMBER_ARRAY(0,0,0,0,0),
  SDO_NUMBER_ARRAY(5,10,10,5,5),
  0.005) from dual;
SDO_UTIL.EXTRUDE(SDO_GEOMETRY(2003,NULL,NULL,SDO_ELEM_INFO_ARRAY(1,1003,1),SDO_O
SDO_GEOMETRY(3008, NULL, NULL, SDO_ELEM_INFO_ARRAY(1, 1007, 1, 1, 1006, 6, 1, 10
03, 1, 16, 1003, 1, 31, 1003, 1, 46, 1003, 1, 61, 1003, 1, 76, 1003, 1), SDO_ORD
INATE_ARRAY(5, 1, 0, 5, 7, 0, 8, 6, 0, 8, 1, 0, 5, 1, 0, 5, 1, 5, 8, 1, 10, 8, 6
, 10, 5, 7, 5, 5, 1, 5, 5, 1, 0, 8, 1, 0, 8, 1, 10, 5, 1, 5, 5, 1, 0, 8, 1, 0, 8
, 6, 0, 8, 6, 10, 8, 1, 10, 8, 1, 0, 8, 6, 0, 5, 7, 0, 5, 7, 5, 8, 6, 10, 8, 6,
0, 5, 7, 0, 5, 1, 0, 5, 1, 5, 5, 7, 5, 5, 7, 0))
The following example returns the three-dimensional composite solid geometry representing an extrusion from a two-dimensional polygon geometry with inner rings.
SELECT SDO_UTIL.EXTRUDE(
  SDO_GEOMETRY(
    2003,
    null,
    null,
    SDO_ELEM_INFO_ARRAY(1, 1003, 1, 11, 2003, 1,
      21, 2003,1, 31,2003,1, 41, 2003, 1),
    SDO_ORDINATE_ARRAY(0,0, 8,0, 8,8, 0,8, 0,0,
      1,3, 1,4, 2,4, 2,3, 1,3, 1,1, 1,2, 2,2, 2,1, 1,1,
      1,6, 1,7, 2,7, 2,6, 1,6, 3,2, 3,4, 4,4, 4,2, 3,2)),
  SDO_NUMBER_ARRAY(-1.0),
  SDO_NUMBER_ARRAY(1.0),
  0.0001) from dual;
SDO_UTIL.EXTRUDE(SDO_GEOMETRY(2003,NULL,NULL,SDO_ELEM_INFO_ARRAY(1,1003,1,11,200
SDO_GEOMETRY(3008, NULL, NULL, SDO_ELEM_INFO_ARRAY(1, 1008, 4, 1, 1007, 1, 1, 10
06, 16, 1, 1003, 1, 46, 1003, 1, 91, 1003, 1, 106, 1003, 1, 121, 1003, 1, 136, 1
003, 1, 151, 1003, 1, 166, 1003, 1, 181, 1003, 1, 196, 1003, 1, 211, 1003, 1, 22
6, 1003, 1, 241, 1003, 1, 256, 1003, 1, 271, 1003, 1, 286, 1003, 1, 301, 1007, 1
, 301, 1006, 10, 301, 1003, 1, 328, 1003, 1, 355, 1003, 1, 370, 1003, 1, 385, 10
03, 1, 400, 1003, 1, 415, 1003, 1, 430, 1003, 1, 445, 1003, 1, 460, 1003, 1, 475
, 1007, 1, 475, 1006, 6, 475, 1003, 1, 490, 1003, 1, 505, 1003, 1, 520, 1003, 1,
535, 1003, 1, 550, 1003, 1, 565, 1007, 1, 565, 1006, 10, 565, 1003, 1, 592, 100
3, 1, 619, 1003, 1, 634, 1003, 1, 649, 1003, 1, 664, 1003, 1, 679, 1003, 1, 694,
1003, 1, 709, 1003, 1, 724, 1003, 1), SDO_ORDINATE_ARRAY(4, 0, -1, 4, 2, -1, 4,
4, -1, 3, 4, -1, 2, 4, -1, 2, 7, -1, 1, 7, -1, 1, 6, -1, 1, 4, -1, 1, 3, -1, 0,
3, -1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, 3, -1, 2, 3, 1, 2, 4, 1, 2, 4, -1, 2, 3, -1, 1, 3, -1, 1, 3, 1, 2, 3, 1
, 2, 3, -1))These are examples from Spatial User's Guide.
ORA-54668 means that you need to update your srid to a 3D srid.
Please check out Spatial User's Guide, Pro Oracle Spatial for 11g book and
the following paper (which we can send you a copy offline)
B. M. Kazar, R. Kothuri, P. v. Oosterom and S. Ravada, "On Valid and Invalid Three-
Dimensional Geometries", 2nd International Workshop on 3D Geo-Information: Requirements, Acquisition,
Modelling, Analysis, Visualisation, 12-14 December 2007, Delft, the Netherlands (Published as Chapter 2,
pp. 19-46 in Advances in 3D Geoinformation Systems Series: Lecture Notes in Geoinformation and
Cartography Oosterom, P.v.; Zlatanova, S.; Penninga, F.; Fendel, E. (Eds.) 2008, XX, 441 p. 235 illus.,
Hardcover ISBN: 978-3-540-72134-5
Maybe if you can post here an example geometry from your data,
we can help you more.
Hope these help.
Thanks

Similar Messages

  • Newbie to blackberry...facing problem with basics

    hi guys,
                 i got my playbook today...........facing problem with basics
             1.how do i perform file actions(like create folder, move,rename)
             2.cant  use drag gesture
             3. ppt applications doesnt show a option to create new presentation(word and xls apps seem to work fine)
             4.can we even download apps from app world to pc  bcuz  everytime it says connect the smartphone to computer even though its physically connected and blackberry desktop manager also shows the device is connected"

    To mange your files, try a file manager like Files & Folders.
    Drag gestures are available in OS 2.0 which should be available before the end of Feb (rumour has it, this week).
    In OS 2 you will also be able to create new PPT presentations.
    To download apps from App World you need to be connected to a Wifi network at the moment.
    Files & Folders, the unified file & cloud manager for PlayBook and BB10 with SkyDrive, SugarSync, Box, Dropbox, Google Drive, Google Docs. Free 3-day trial! - Jon Webb - Innovatology - Utrecht, Netherlands

  • Problems with Input Ready Query

    Hello All,
    I'm facing problems with input ready query for BI IP.
    I've created the input query on aggregation level and maintianed all the planning settings.  It is not allowing me to edit, when i'm attaching in the web template.
    I also attached a button copy function, and i'm able to execute it and save it, but it not allowing me to change manually.
    I also enabled the 3rd option for keyfigures...data can be changed with planning functions and user input.
    Please help me in this regard.
    We have just started the development of BI-IP, please suggest me if there are any notes to be applied.
    Regards
    Kumar

    Hello Johannes,
    Yes I've set to the finest granularity...even if it is Only one characteristic and one key figure without any restrictions...
    I've checked even planning tab page under properties...it is also fine..
    But still it is not allaowing me to go to edit mode...this is a fresh instalation and the query i'm working is the first one...
    Please suggest me if there are any notes to be applied, we are on Support Pack 10.
    Regards
    Jeevan Kumar

  • Problem with timestamp in query

    I have problem with timestamp in JPA query.
    I wonna select all data from database where difference between two timestamps is more than 3 month.
    Database:
    ID timestamp1 timestamp2
    1 20008-11-19 15:02000 20008-08-19 15:02000
    2 20008-11-19 15:02000 20008-11-14 15:02000
    @Column(name = "timestamp1", nullable = false)
    @Temporal(TemporalType.TIMESTAMP)
    public Date timestamp1;
    @Column(name = "timestamp2", nullable = false)
    @Temporal(TemporalType.TIMESTAMP)
    public Date timestamp2;
    sql query works:
    select id from table where
    MONTH( DATE(timestamp1) - DATE(timestamp2) ) > 3
    but how I can write in Java?
    I't doesnt wrk:
    Query query = em.createQuery("SELECT f.id FROM Foo f WHERE MONTH( DATE(f.timestamp1) - DATE(f.timestamp2) ) > 3 ")
    error:
    ExceptionUtil E CNTR0020E: EJB threw an unexpected (non-declared) exception during invocation of method .
    Exception data: <openjpa-1.0.2-r420667:627158 nonfatal user error> org.apache.openjpa.persistence.ArgumentException: An error occurred while parsing the query filter 'SELECT f.id FROM Foo f WHERE MONTH( DATE(f.timestamp1) - DATE(f.timestamp2) ) > 3'.
    Error message: <openjpa-1.0.2-r420667:627158 nonfatal user error> org.apache.openjpa.kernel.jpql.ParseException: Encountered "MONTH (" at character 438, but expected: ["(", "+", "-", ".", ":", "", "=", "?", "ABS", "ALL", "AND", "ANY", "AS", "ASC", "AVG", "BETWEEN", "BOTH", "BY", "CONCAT", "COUNT", "CURRENT_DATE", "CURRENT_TIME", "CURRENT_TIMESTAMP", "DELETE", "DESC", "DISTINCT", "EMPTY", "ESCAPE", "EXISTS", "FETCH", "FROM", "GROUP", "HAVING", "IN", "INNER", "IS", "JOIN", "LEADING", "LEFT", "LENGTH", "LIKE", "LOCATE", "LOWER", "MAX", "MEMBER", "MIN", "MOD", "NEW", "NOT", "NULL", "OBJECT", "OF", "OR", "ORDER", "OUTER", "SELECT", "SET", "SIZE", "SOME", "SQRT", "SUBSTRING", "SUM", "TRAILING", "TRIM", "UPDATE", "UPPER", "WHERE", <BOOLEAN_LITERAL>, <DECIMAL_LITERAL>, <IDENTIFIER>, <INTEGER_LITERAL>, <STRING_LITERAL>].
    at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder$ParsedJPQL.parse(JPQLExpressionBuilder.java:1665)
    at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder$ParsedJPQL.<init>(JPQLExpressionBuilder.java:1645)

    The error is indocating improper formatting of your JPQL string. MONTH is not understood. I would recommend using your SQL string in a createNativeQuery(...) call instead.
    Doug

  • Problem with unit in Query

    Hallo Experts,
    We encounter a problem with unit in our Query.
    Szenario:
    We use the Unit like PC, SET in Query.
    In Table T006 those Units have value 0 in the field ANDEC, so they will be rounded up and rounded down in Query.
    Our Problem is some Queries need the rounding up and down but others don't need this function.
    Where and how should we change to solve the problem.
    thanks & Best regards

    hi,
    if you want to control the rounding off while unit conversion you can do it from SPRO
    In the BW system, goto SPRO -> SAP NetWeaver -> General Settings -> Check Units of Measurement -> Units of Measurement -> Choose the unit corresponding to 'KM' -> Click on 'Details' button in the toolbar.
    Look the field 'Decimal Pl rounding'. Change this to 3 or whatever value you choose and see if it works.
    in above link i have taken example of KM, you need need to select the required unit.
    let us know if this is solves your problem. I am not sure if this can be done for individual queries but this is controlled by UOM wise as mentioned above.
    Regards,
    Rk.

  • Export with embedded spatial query

    I am trying to use the exp utility to export spatial data. I am using the "query" parameter to specify a spatial query based on another spatial layer.
    I have two layers. Admin1 has lots of administrative boundaries. PE has three polygons in it over different sections of my data set. I want to get the data extracted from admin1 that exists in these areas to an export file(along with all the triggers and other related database objects). I was hoping this approach would work
    I am getting errors saying that the identifier is too long.
    Here is the par file:
    file=1.exp
    log=1.log
    tables=(admin1, pe)
    query="""WHERE mdsys.SDO_RELATE(GEOM1,pe.GEOM, 'MASK=INSIDE QUERYTYPE=WINDOW')='TRUE' OR SDO_RELATE(GEOM2,pe.GEOM, 'MASK=INSIDE QUERYTYPE=WINDOW')='TRUE'"""
    I get:
    Export: Release 10.2.0.1.0 - Production on Wed May 10 11:56:14 2006
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Produc
    tion
    With the Partitioning, OLAP and Data Mining options
    Export done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
    About to export specified tables via Conventional Path ...
    . . exporting table ADMIN1
    EXP-00056: ORACLE error 972 encountered
    ORA-00972: identifier is too long
    . . exporting table PE
    EXP-00056: ORACLE error 972 encountered
    ORA-00972: identifier is too long
    Export terminated successfully with warnings.
    Is this even possible? Can you use the exp query parameter to perform a spatial operation? Did this work? I am accustom to seeing record counts next to the exported tables, and they are not present in the output from exp. The export file is not empty. It exported all the features, not the subset I had requested.
    How can I structure the query differently so that I get the export file with just the lines that fall within the polygons?
    Thanks,
    John

    I am trying to use the exp utility to export spatial data. I am using the "query" parameter to specify a spatial query based on another spatial layer.
    I have two layers. Admin1 has lots of administrative boundaries. PE has three polygons in it over different sections of my data set. I want to get the data extracted from admin1 that exists in these areas to an export file(along with all the triggers and other related database objects). I was hoping this approach would work
    I am getting errors saying that the identifier is too long.
    Here is the par file:
    file=1.exp
    log=1.log
    tables=(admin1, pe)
    query="""WHERE mdsys.SDO_RELATE(GEOM1,pe.GEOM, 'MASK=INSIDE QUERYTYPE=WINDOW')='TRUE' OR SDO_RELATE(GEOM2,pe.GEOM, 'MASK=INSIDE QUERYTYPE=WINDOW')='TRUE'"""
    I get:
    Export: Release 10.2.0.1.0 - Production on Wed May 10 11:56:14 2006
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Produc
    tion
    With the Partitioning, OLAP and Data Mining options
    Export done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
    About to export specified tables via Conventional Path ...
    . . exporting table ADMIN1
    EXP-00056: ORACLE error 972 encountered
    ORA-00972: identifier is too long
    . . exporting table PE
    EXP-00056: ORACLE error 972 encountered
    ORA-00972: identifier is too long
    Export terminated successfully with warnings.
    Is this even possible? Can you use the exp query parameter to perform a spatial operation? Did this work? I am accustom to seeing record counts next to the exported tables, and they are not present in the output from exp. The export file is not empty. It exported all the features, not the subset I had requested.
    How can I structure the query differently so that I get the export file with just the lines that fall within the polygons?
    Thanks,
    John

  • Index problem in a spatial query

    I try to run following query in SQL Plus:
    SELECT A.objectid FROM TABBDG A, TABREG B
    WHERE A.objectid = 68 AND B.regionname = 'Hong2'
    AND SDO_RELATE(A.geoloc, B.geoloc, 'mask=INSIDE querytype = WINDOW') = 'TRUE';
    To find out weather or not objectid = 68 is inside of region (='Hong2"). I got following error messages:
    ERROR at line 1:
    ORA-13226: interface not supported without a spatial index
    ORA-06512: at "MDSYS.MD", line 1723
    ORA-06512: at "MDSYS.MDERR", line 8
    ORA-06512: at "MDSYS.SDO_3GL", line 57
    ORA-06512: at line 1
    But when I try to add an index to table TABREG, I got following error:
    ERROR at line 1:
    ORA-29879: cannot create multiple domain indexes on a column list using same indextype
    Seem to me that the index was already there. Can any one help me? Thanks.

    I found out the reason of problem. I used an old version of EasyLoader (4.5?). When I get the latest EasyLoader V6.5, there is no problem any more to run spatial query. You can get lates EasyLoader V6.5 from MapInfo or from me at: [email protected]
    Thanks for all help.

  • Encountering Problems with Basic Sound Tutorial

    Hello everyone,
    I am encountering problems with a basic sound tutorial. I am absolutely confused as to what the problem may be because the code is so simple, and is essentially copied from the textbook. I am convinced that I have done something very silly but cannot see it.
    I have attempted to run this in an appletviewer, Firefox and Internet Explorer. I have attempted to launch it from both a .class file and a .jar file. I have uninstalled and offline installed the JDK and JRE and successfully tested the new installations.
    The audio file I am attempting to load and play is an .AU (Sun/Next 8-bit u-law) audio file I created in Audacity. It is located in the same folder as the AudioApplet.class file.
    My sound system is defintely on, since I have listened to music all day. I have attempted running the program with Media Player closed.
    package edu.myuniversityid.sandbox;
    import java.applet.Applet;
    import java.applet.AudioClip;
    * @author Ibuki
    public class AudioApplet extends Applet
         * Initialization method that will be called after the applet is loaded
         * into the browser.
        public void init()
            super.init();
            AudioClip ac = this.getAudioClip(this.getDocumentBase(), "sample.au");
            ac.play();
    }The code compiles fine, however absolutely I get a small white window when it is run. No sound.
    Thankyou for your time.
    Regards,
    Ibuki.
    PS. I am sure this worked before the university forced me to update my version of Windows to SP2. Hence, the reason for reinstalling Java. Twice.
    Edited by: Ibuki on Jan 31, 2008 11:09 AM becasuse: Added a PS.

    I have attempted this alternative, without success:
        public void init()
            try
                super.init();
                URL url = new URL(this.getDocumentBase(), "sample.au");
                AudioClip ac = this.getAudioClip(url);
                ac.play();
            catch (MalformedURLException ex)
                Logger.getLogger(AudioApplet.class.getName()).log(Level.SEVERE, null, ex);
        }The sample.au is definetly in the correct directory. Both File Explorer and NetBeans confirm this.
    Edited by: Ibuki on Jan 31, 2008 11:59 AM
    I have discovered a temporary solution that works in the applet viewer. The applet will load and plays the correct music perfectly. However, using this code it is not working when I try to deploy it using a web browser (MSIE and FF)!
    public void init()
            super.init();
            AudioClip ac = this.getAudioClip(this.getClass().getResource("sample.au"));
            ac.play();
    Edited by: Ibuki on Jan 31, 2008 12:12 PM
    Eureka!
    Having worked in the applet viewer I managed to get it working in the web browser by simply packaging my SoundApplet.class and sample.au into a .jar archive.
    <html>
         <body>
              <applet code="edu.myuniversityid.sandbox.AudioApplet.class" archive="dist/AudioApplet.jar">Unfortunately, this applet content cannot be displayed on this web page because your current browser does not support Java SE 6! Please <a href="http://www.java.com/">update your version of Java</a>.</applet>
         </body>
    </html>
    public void init()
            super.init();
            AudioClip ac = this.getAudioClip(this.getClass().getResource("sample.au"));
            ac.play();
        }Thankyou everyone.
    This thread can be closed if applicable. I'm not aware of the current moderation policy on this forum.
    Edited by: Ibuki on Jan 31, 2008 12:12 PM

  • Problems with basic lower third ?

    Is anyone having a problem with the "basic lower third" template ? I keep getting a second, "ghost" copy of the first (top) line of the title created, shifted about 10 pixels above the original .. this only seems to happen after the project and/or library is saved and re-opened ... FCP X 10.1.4, Macbook Pro Retina ... thanks in advance

    Thanks, but nope, if you look closely, you can see that there is a black drop shadow already set ... unselecting it just gives you the same double image in white, just without the black drop shadow ... bizarrely, it's only ever the top line that is doubled up ... it's as if a second copy of the top line is created ... it is also un-selectable on screen, i.e. if you click on the second copy you can't edit or move it ... the second copy only appears after the project/library is closed and re-opened ... i.e. it all looks fine when you create it

  • Problem with a Bex Query Report with Web Intelligence

    Hello!
    I have a Bex query (with query Bex version 7.0) I'm connecting with Web Intelligence (4.0) but one of the attributes instead of displaying the description shows only the key, and it is strange because other cubes if given by the conversion.
    I wonder if there is a solution for this or if it is a problem of version 4.0 of Web Intelligence.
    I await your response,
    Greetings!

    Hi,
    Whereabouts in the application are you seing this problem?  (in the query panel conditions, in the prompt list of values, or in the table block? )
    also, what do you mean by "and it is strange because other cubes if given by the conversion" ?
    it's worth noting that the "key and text display properties" in the Bex Query Designer do not influence webi.  WebI consumes the global infoobject property from BW RSH1.
    Regards,
    H
    p.s. if you need to understand which features are or are not supported with BI 4.0 tools, please look here: http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d056e1bc-2794-2e10-959e-8779c5623cc5

  • Problem with REGEXP_SUBSTR related query.

    I am having a problem with this query:
    SELECT *
      FROM (    SELECT REGEXP_SUBSTR ('{SUMMER}|{POINT OF SALE}',
                                               '({)([A-Z]+ *[A-Z]*)(})',
                                               1,
                                               LEVEL,
                                               'i',
                                               2)
                                   val
                  FROM DUAL
            CONNECT BY LEVEL <=
                          REGEXP_COUNT ('{SUMMER}|{POINT OF SALE}', '|') + 1)
    WHERE val IS NOT NULL
    I need the output in 2 rows in this format:
    VAL
    ====
    SUMMER
    POINT OF SALE
    But I am not able to get 'POINT OF SALE' in the output because of the blank space, or maybe some other reason. Can anyone correct my query?

    So you want something like this?
    SQL> ed
    Wrote file afiedt.buf
      1  SELECT *
      2    FROM (    SELECT REGEXP_SUBSTR ('{SUMMER}|{POINT OF SALE}', '[^{|}]+', 1, LEVEL, 'i') val
      3                FROM DUAL
      4          CONNECT BY LEVEL <=
      5                        REGEXP_COUNT ('{SUMMER}|{POINT OF SALE}', '[^|]+'))
      6*  WHERE val IS NOT NULL
    SQL> /
    VAL
    SUMMER
    POINT OF SALE
    SQL>

  • Basic question - Problems with basic query - Mask = INSIDE

    Greetings,
    I'm doing a basic query on Oracle 10g Spatial, is to determine the intersection between two layers (one point called "Calidad1") and other polygons, called "Parishes")
    For issuing the following query based on the documentation of oracle:
    "select C1.ID, C1.SECUENCIA,
    P. COD_ENTIDAD, P. STATE
    Cod_county P., P. TOWNSHIP,
    P. COD_PARROQUIA, P. PARISH
    from CALIDAD1 c1,
    PARISHES p
    where sdo_relate (c1.geoloc, p.geoloc, 'mask = INSIDE querytype = WINDOW') = 'TRUE'
    order by C1.ID;
    When I run the query, no errors but extends too long (more than 10 minutes) and no end, I have to cancel.
    Canceling shows me the following error:
    "ORA-13268: error obtaining dimension from USER_SDO_GEOM_METADATA
    ORA-06512: at "MDSYS.MD", line 1723
    ORA-06512: at "MDSYS.MDERR", line 8
    ORA-06512: at "MDSYS.SDO_3GL", line 89 "
    This query is very basic and the data volume is small, a conclusion: I must be skipping a step or activity.
    Can you guide a little to resolve this situation and get the query that I need?
    Thanks to all

    First, try this query with the ordered hint and also note the change in the FROM clause.
    select /*+ ordered */ C1.ID, C1.SECUENCIA,
    P. COD_ENTIDAD, P. STATE
    Cod_county P., P. TOWNSHIP,
    P. COD_PARROQUIA, P. PARISH
    from PARISHES p,
    CALIDAD1 c1,
    where sdo_relate (c1.geoloc, p.geoloc, 'mask = INSIDE querytype = WINDOW') = 'TRUE'
    order by C1.ID;
    See if this is using the index as expected. If not try this:
    select /*+ ordered index(p name_of_the_spatial_index_on_the_PARISH_Table) */
    C1.ID, C1.SECUENCIA,
    P. COD_ENTIDAD, P. STATE
    Cod_county P., P. TOWNSHIP,
    P. COD_PARROQUIA, P. PARISH
    from PARISHES p,
    CALIDAD1 c1,
    where sdo_relate (c1.geoloc, p.geoloc, 'mask = INSIDE querytype = WINDOW') = 'TRUE'
    order by C1.ID;
    siva

  • Basic Spatial Query

    Hi guys,
    I am currently developing a java applet to display telecommunication sites taken from an Oracle 8.1.6 DB. The company I work for also happens to have the spatial cartridge which I intend to use to overlay a country map over my plottings. I have imported the map data into a table, and I can view the GEOLOC information as a huge stream of longs and lats via a simple SELECT query in SQLPLUS - so the data has been imported correctly.
    I have tried to digest huge articles on querying spatial information - however, unfortunately being an Oracle novice, it has left me quite dazzled.
    Basically all I want to do is take from my spatial table a list of long and lat coordinates (in double format) in a specific physical area, so that I can display them from there.
    I'd appreciate any help that anyone could give.
    null

    Hi David,
    There are a few things you will have to do in order to get this to work quickly.
    1) You will have to insert data into the user_sdo_geom_metadata field so Oracle Spatial can know some information about the data you've created (table name, spatial column name, information about upper and lower bounds as well as tolerance for each dimension.
    2) You'll need to create a spatial index on the data.
    3) You'll need to analyze the spatial index table.
    4) Then you can query the data. You'll have to decide whether you need exact answers (using the sdo_relate operator) or approximate answers based only on the index (sdo_filter operator).
    There is too much information required to put it all here, but I'll include a few samples.
    to insert data into user_sdo_geom_metadata:
    insert into user_sdo_geom_metadata values ('TABLE_NAME','GEOMETRY_COLUMN_NAME',
    mdsys.sdo_dim_array(mdsys.sdo_dim_element('X',-180.0,180,0.00000005),
    mdsys.sdo_dim_element('Y',-90,90,0.00000005)),NULL);
    commit;
    In the above example, TABLE_NAME is the name of the table with your geometry column, then the geometry column name, then the dimarray has attributes in it associated with each of two dimensions (two dimensional data is stored here), the first dimension has a lower bound of -180, and upper bound of 180, and a tolerance or 0.00000005 (the decimal precision of your data, with a 5 appended), the second dimension has the info supplied, and the last null means there is no coordinate system stored with the data. I'd suggest if you are a newbie to leave it as NULL, then ease into coordinate systems once you get more experience.
    2) create the index
    create index table_name_sidx
    on table_name(geometry_column_name)
    indextype is mdsys.spatial_index
    parameters('sdo_level=x');
    where x is usually a number between 6 and 14 based on the type of data you have. There is a lot to say about this, but I can't say it here.
    3) analyze the spatial index table:
    from sql*plus, run the following statements:
    set head off
    spool analyze_it.sql
    select ' analyze table ' &#0124; &#0124; sdo_index_table &#0124; &#0124; ' estimate statistics sample 32 percent;'
    from user_sdo_index_metadata order by sdo_index_table;
    spool off;
    @analyze_it.sql
    4) execute a query based on an area of interest:
    this statement will return all geometries that have any interaction with a query window specified by a rectangle with bounds
    2,2, 10,2, 10,10, 2,10, 2,2
    SELECT geometry_column_name
    FROM table_name
    where sdo_relate (geometry_column_name,
    mdsys.sdo_geometry(2003,NULL, NULL
    mdsys.sdo_elem_info_array(1,1003,1),
    mdsys.sdo_ordinate_array (2,2, 10,2, 10,10, 2,10, 2,2)),
    'mask=anyinteract querytype=window'
    = 'TRUE';
    You will have to dig more into each of these subject to understand them.
    Hope this helps,
    dan
    null

  • Problem with Counter in Query

    Hi Experts,
    There is a problem in my query output.
    I have a CKF for sales documents number created with replacement path which gives the correct count of number of Sales documents.
    But the req here is to create two more counters which will be counting the passed and failed count with reference to other KF1 (the value of this KF can be 0 or 1).
    i.e. If the KF1 value is then failed count would be 1 .
           else passed count would be 1.
    I have used the Replcement path variable created for Sales Document count.
    For failed count the CKF formula which I have created is: (Sales Order Count ) * (KF1<>1)
    Which gives the right result but as soon as I remove the drill down , instead of aggrading the total results, failed counter still shows 1 which is incorrect.
    Could any one please help me out.
    Regards,
    BW User

    hello,
    try using exception aggregation as total and reference char as the one which u have reomved from drilldown.
    Regds,
    Shashank

  • How can i use index in select query.. facing problem with the select query.

    Hi Friends,
    I am facing a serious problem in one of the select query. It is taking a lot of time to fetch data in Production Scenario.
    Here is the query:
      SELECT * APPENDING CORRESPONDING FIELDS OF TABLE tbl_summary
        FROM ztftelat LEFT JOIN ztfzberep
         ON  ztfzberep~gjahr = st_input-gjahr
         AND ztfzberep~poper = st_input-poper
         AND ztfzberepcntr  = ztftelatrprctr
        WHERE rldnr  = c_telstra_accounting
          AND rrcty  = c_actual
          AND rvers  = c_ver_001
          AND rbukrs = st_input-bukrs
          AND racct  = st_input-saknr
          AND ryear  = st_input-gjahr
          And rzzlstar in r_lstar                            
          AND rpmax  = c_max_period.
    There are 5 indices present for Table ZTFTELAT.
    Indices of ZTFTELAT:
      Name   Description                                               
      0        Primary key( RCLNT,RLDNR,RRCTY,RVERS,RYEAR,ROBJNR,SOBJNR,RTCUR,RUNIT,DRCRK,RPMAX)                                          
      005    Profit (RCLNT,RPRCTR)
      1        Ledger, company code, account (RLDNR,RBUKRS, RACCT)                                
      2        Ledger, company code, cost center (RLDNR, RBUKRS,RCNTR)                           
      3        Account, cost center (RACCT,RCNTR)                                        
      4        RCLNT/RLDNR/RRCTY/RVERS/RYEAR/RZZAUFNR                        
      Z01    Activity Type, Account (RZZLSTAR,RACCT)                                        
      Z02    RYEAR-RBUKRS- RZZZBER-RLDNR       
    Can anyone help me out why it is taking so much time and how we can reduce it ? and also tell me if I want to use index number 1 then how can I use?
    Thanks in advance.

    Hi Shiva,
    I am using two more select queries with the same manner ....
    here are the other two select query :
    ***************1************************
    SELECT * APPENDING CORRESPONDING FIELDS OF TABLE tbl_summary
        FROM ztftelpt LEFT JOIN ztfzberep
         ON  ztfzberep~gjahr = st_input-gjahr
         AND ztfzberep~poper = st_input-poper
         AND ztfzberepcntr  = ztftelptrprctr
        WHERE rldnr  = c_telstra_projects
          AND rrcty  = c_actual
          AND rvers  = c_ver_001
          AND rbukrs = st_input-bukrs
          AND racct  = st_input-saknr
          AND ryear  = st_input-gjahr
          and rzzlstar in r_lstar             
          AND rpmax  = c_max_period.
    and the second one is
    *************************2************************
      SELECT * APPENDING CORRESPONDING FIELDS OF TABLE tbl_summary
        FROM ztftelnt LEFT JOIN ztfzberep
         ON  ztfzberep~gjahr = st_input-gjahr
         AND ztfzberep~poper = st_input-poper
         AND ztfzberepcntr  = ztftelntrprctr
        WHERE rldnr  = c_telstra_networks
          AND rrcty  = c_actual
          AND rvers  = c_ver_001
          AND rbukrs = st_input-bukrs
          AND racct  = st_input-saknr
          AND ryear  = st_input-gjahr
          and rzzlstar in r_lstar                              
          AND rpmax  = c_max_period.
    for both the above table program is taking very less time .... although both the table used in above queries have similar amount of data. And i can not remove the APPENDING CORRESPONDING. because i have to append the data after fetching from the tables.  if i will not use it will delete all the data fetched earlier.
    Thanks on advanced......
    Sourabh

Maybe you are looking for