How to retreive x/y from mdsys.sdo_geometry

I need to retreive the coord pair for a point table. If I use:
select p.id, p.shape.sdo_point.x, p.shape.sdo_point.y from pointdatastore p
the returned result is null. Said table was created from ESRI tools via ArcSDE which I believe is the root problem. I'm a newbie to Spatial but a lot of years with ESRI tools.
Any help.

Neil,
Are you certain ESRI is storing the points as a SDO_POINT type? Although I do not know for certain I expect they are not - which is why you would be coming up with NULLs. Rather ESRI is probably using the ordinate array which you can select vertices from using SDO_UTIL.GETVERTICES (which is found in Oracle Spatial). here's the corresponding documentation:
http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14255/sdo_util.htm#BABDEGIA
I hope this helps.
-Justin

Similar Messages

  • Where is URL stored in CRM tables How to retreive URL address from table

    Hi,
    Can any one tell where URL address is stored in CRM.
    And how to retreive URL Address from CRM tables.
    As i'm not able to find exactly how to retrive the url form the tables. as the URL address is not visible.
    Thanks & Regards,
    Rajender.
    Edited by: Rajender k on Aug 12, 2008 6:37 PM

    I am not able to get you. Please rephrase or elaborate.

  • How to retreive Thunderbird files from a hard drive backup due to having hard drive replaced.

    My hard drive crashed but I was able to backup to external drive the day before. Dell replaced the hard drive and I did a restore from back up but I can't find the Thunderbird profile files from the back up to put into my new Thunderbird on the new hard drive. Where can I find them on the backup and how can I import them to the new application of Thunderbird?

    See https://support.mozilla.org/en-US/kb/profiles-tb to locate your profile on the old hard drive.
    Then locate your profile on the new drive.
    Copy the xxxxxxxx.default from your old drive to the same folder that your new one is in; so now you have <old 8-char>.default and <new 8-char>.default in the same folder.
    See https://support.mozilla.org/en-US/kb/using-multiple-profiles to switch from the new one to the old one.

  • How to retreive mutiple values from select boxes in jsp

    <select name="indices" style="width:180" size="6">
                             <option value=F_ARCHIVEDATE> F_ARCHIVEDATE </option>           
                   <option value=F_DELETEDATE> F_DELETEDATE </option>           
                   <option value=F_DOCCLASSNUMBER> F_DOCCLASSNUMBER </option>           
                   <option value=F_DOCFORMAT> F_DOCFORMAT </option>           
                   <option value=F_DOCLOCATION> F_DOCLOCATION </option>           
                   <option value=F_DOCNUMBER> F_DOCNUMBER </option>           
                   <option value=F_DOCTYPE> F_DOCTYPE </option>           
                   <option value=F_ENTRYDATE> F_ENTRYDATE </option>           
                   <option value=F_PAGES> F_PAGES </option>           
                   <option value=F_RETENOFFSET> F_RETENOFFSET </option>           
                   <option value=date1> date1 </option>
    <option value=id> id </option>
    <option value=name> name </option>
              </select>..
    hi iam having a select box with above option values..when we submitt the page i want retreive all these option values in anohter jsp called retreive.jsp..how can i do that..i want to put all these values in array in that jsp page..
    regards,
    sam

    Hi
    In ur code u cant select multiple values. Alter ur code like this
    <select name="indices" style="width:180" size="6" multiple> // multiple added here
    <option value=F_ARCHIVEDATE> F_ARCHIVEDATE </option>
    <option value=F_DELETEDATE> F_DELETEDATE </option>
    <option value=F_DOCCLASSNUMBER> F_DOCCLASSNUMBER </option>
    <option value=F_DOCFORMAT> F_DOCFORMAT </option>
    <option value=F_DOCLOCATION> F_DOCLOCATION </option>
    <option value=F_DOCNUMBER> F_DOCNUMBER </option>
    <option value=F_DOCTYPE> F_DOCTYPE </option>
    <option value=F_ENTRYDATE> F_ENTRYDATE </option>
    <option value=F_PAGES> F_PAGES </option>
    <option value=F_RETENOFFSET> F_RETENOFFSET </option>
    <option value=date1> date1 </option>
    <option value=id> id </option>
    <option value=name> name </option>
    </select>..
    in retrieve.jsp write like this
    <% String[] mv =request.getParameterValues("indices"); %>
    <% for(int i=0; i<mv.length;i++)
    {     %>
    <br>
    <%= mv[i] %>
    <% }
    %>
    I hope it will satisfy u :)

  • How to retreive week days from bit mask value

    Hi!
    I have a column 'DOW' that store days of the week using bit mask value. Here is how it works:
    SUN = 1
    MON = 2
    TUE = 4
    WED = 8
    THU = 16
    FRI = 32
    SAT = 64
    All days of week is 127 which is cumulative of all the above. If user selects MON+FRI, then value would be 34.
    I need to retrieve data from this column showing the actual day names, separated by a comma. For example, Monday, Friday
    Is it possible in Oracle 10g to do this via SQL, if so how?
    Any help is deeply appreciated..
    Thanks,
    Arti

    Did you try that beautiful Query, Provided by Blushadow..?
    SQL> select c1,rtrim(DECODE(bitand(c1, 1),1,'Sun,',NULL)||
      2            DECODE(bitand(c1, 2),2,'Mon,',NULL)||
      3            DECODE(bitand(c1, 4),4,'Tue,',NULL)||
      4            DECODE(bitand(c1, 8),8,'Wed,',NULL)||
      5            DECODE(bitand(c1, 16),16,'Thu,',NULL)||
      6            DECODE(bitand(c1, 32),32,'Fri,',NULL)||
      7            DECODE(bitand(c1, 64),64,'Sat,',NULL),',') days
      8  from test;
            C1 DAYS
             1 Sun
             2 Mon
            16 Thu
             9 Sun,Wed
           127 Sun,Mon,Tue,Wed,Thu,Fri,Sat
            34 Mon,Fri
    6 rows selected.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How to retreive a video from icloud

    I accidently deleted a video that was very important.  I had not synced it yet.  I have my icloud set to automatically send photos/videos to icloud.  I can always see the photos under the photo stream, but videos don't show there.  Can someone tell me how to check icloud and see if the video happened to be uploaded or how to download from it?
    Thanks.

    http://support.apple.com/kb/HT4859

  • How to retreive out parameters from function in sql statement

    hi dear,
    Suppose i have a fuction with two "out" parameters, i want to show the values of these paramenters in sql stm.
    like
    select my_function() from dual;
    Thanx

    Can't be done. To use a function in SQL it can only have a single return value.
    Try something like this changing the data types appropriately.
    var x number
    var y number
    var z number
    exec :x := my_function(:y, :z)
    print

  • How to retreive a record from access DB using Java?

    I have an access DB, I'm trying to get a record from the access DB, I need clue to keep going, please check my code belowpackage PermutPack;
    import java.sql.*;
    public class BD_Connection {
          public static void main(String[] args){
               try {
                  Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                  // set this to a MS Access DB you have on your machine
                  String filename = "C:/Dev-Java/Permutation/Lexiteria_US.mdb";
                  String database = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=";
                  database+= filename.trim() + ";DriverID=22;READONLY=true}"; // add on to the end
                  // now we can get the connection from the DriverManager
                  Connection con = DriverManager.getConnection( database ,"","");
                  Statement st = con.prepareStatement("SELECT word FROM Lexiteria_BD WHERE ID = 5688");
                  System.out.println("st: "+st);
                 /* PreparedStatement pstmt2 = con.prepareStatement(
                          "SELECT a, b, c FROM Table1", ResultSet.TYPE_SCROLL_SENSITIVE,
                          ResultSet.CONCUR_UPDATABLE);
              ResultSet rs = pstmt2.executeQuery();*/
               catch (Exception e) {
                  System.out.println("Error: " + e);
    }

    ronisto wrote:
    Good but if I do System.out.println("ps: "+ps); I'm getting "ps: sun.jdbc.odbc.JdbcOdbcPreparedStatement@13c5982"Right, that's the reference value of the Java object. Immaterial.
    Does the query work now?
    You realize, of course, that you have to call executeQuery() on the PreparedStatement and then get the results out of the ResultSet.
    Maybe you need a JDBC tutorial to brush up on the basics. Google for "Sun JDBC tutorial".
    %

  • How to retreive and display output list from BAPI

    Hello
    I am making an applcation using SUP 2.0, and this application make an user to get leave history using a Mobile System from SUP.
    I've created the MBO as Attributes using the BAPI: BAPI_LEAVE_HISTORY.
    This BAPI has some parameters IN and OUT.
    Input parameters are Employee Id and date.
    The parameter OUT is a List that retreives the employee leave history.
    Anyone has an Idea or example how to retreive the output from BAPI and displaying the output on a screen.
    Any tips or blogs that can help me?
    Thanks all!
    Satish

    Hi David Brandow,
    I have tried your solution where I just created a MBO for my 'operation' and I'm using sync parameters to execute the RFC.
    The problem I'm facing is, for example, if I create a record it gets saved in the MBO table and the record successfully gets created in SAP as well after a sync. But when I create another record and sync, the previously saved record in MBO table also gets executed so I'm getting duplicate entries in SAP.
    Have you or anyone faced this problem?
    Any response is appreciated. Please let me know if I'm not clear, I realized its a complicated scenario.
    Thanks,
    Sandeep

  • Calling a SP or Function from Java receiving a geometry(MDSYS.SDO_GEOMETRY)

    Hi there,
    What I want to do is: calling a stored procedure OR function from Java with a String-variable as input and receiving a geometry (SDO_GEOMETRY).
    I’m facing currently the problem of calling a stored function on oracle 11g from Java using JPA (EclipseLink), Spring 2.5.6 returning an MDSYS.SDO_GEOMETRY object.
    I’ve tried to call a stored procedure with MDSYS.SDO_GEOMETRY as an output parameter instead, but with no success.
    The function’s signature looks like this:
    CREATE or REPLACE
    FUNCTION GET_GEO_BRD_FUNCTION(p_geo_brd_id IN VARCHAR2) RETURN MDSYS.SDO_GEOMETRY AS
    sdo_geom    MDSYS.SDO_GEOMETRY := null;
    BEGIN
    /* do some fancy stuff on the database side */
      SELECT sp_geom
        INTO sdo_geom
        FROM geo_brd WHERE id = p_geo_brd_id;
      RETURN sdo_geom;
    END;
    The calling code looks like this:
    MyClass extends JpaDaoSupport{
       /** logger */
       protected static final ILogger LOG = LogFactory.getLogger(MyClass.class);
        * {@inheritDoc}
        * @see com.example.MyClass#calculateGeometry(java.lang.String)
       @Override
       public JGeometry calculateGeometry(final String id) {
           JGeometry geometry = null;
           final JpaCallback action = new JpaCallback() {
                @Override
                public Object doInJpa(final EntityManager em) throws PersistenceException {
                   final Session session = JpaHelper.getEntityManager(em).getActiveSession();
                   final StoredFunctionCall functionCall = new StoredFunctionCall();
                   functionCall.setProcedureName("GET_GEO_BRD_FUNCTION");
                   functionCall.addNamedArgument("p_geo_brd_id");
                   functionCall.setResult("sdo_geom", Oracle.sql.STRUCT.class);
                   final ValueReadQuery query = new ValueReadQuery();
                   query.setCall(functionCall);
                   query.addArgument("p_geo_brd_id");
                   final ArrayList args = new ArrayList();
                   args.add("2e531e62-2105-4522-978a-ab8baf19e273");// hardcoded for test
                   final Object result = session.executeQuery(query, args);
                   return result;
        final STRUCT result = (STRUCT) this.getJpaTemplate().execute(action);
        try {
           geometry = JGeometry.load(result);
        } catch (final SQLException e) {
           MyClass.LOG.error("Error loading JGeometry from STRUCT.", e);
           return null;
        return geometry;
    And when I execute the query I get the following error:
    Internal Exception: java.sql.SQLException: ORA-06550: Row 1, Column 13:
    PLS-00382: expression is of wrong type
    ORA-06550: Row 1, Column 7:
    PL/SQL: Statement ignored
    Error Code: 6550
    Call: BEGIN ? := GET_GEO_BRD_FUNCTION(p_geo_brd_id=>?); END;
         bind => [=> sdo_geom, 2e531e62-2105-4522-978a-ab8baf19e273]
    Query: ValueReadQuery()
    So I thought may be let's try it with a stored procedure instead...
    The procedure looks like this:
    CREATE or REPLACE
    PROCEDURE GET_GEO_BRD_PROCEDURE(p_geo_brd_id IN VARCHAR2, sdo_geom OUT MDSYS.SDO_GEOMETRY) AS
    BEGIN
    /* do some fancy stuff on the database side */
      SELECT sp_geom
        INTO sdo_geom
        from geo_brd where id = p_geo_brd_id;
    END;
    The calling Java code in case of the stored procedure looks like this (only the content of the JPACallback has changed):
    @Override
    public Object doInJpa(final EntityManager em) throws PersistenceException {
        final Session session = JpaHelper.getEntityManager(em).getActiveSession();
        final StoredProcedureCall spCall = new StoredProcedureCall();
        spCall.setProcedureName("GET_GEO_BRD_PROCEDURE");
        spCall.addNamedArgument("p_geo_brd_id", "p_geo_brd_id", String.class);
        spCall.addNamedOutputArgument("sdo_geom", "sdo_geom", OracleTypes.STRUCT);
        final ValueReadQuery query = new ValueReadQuery();
        query.setCall(spCall);
        query.addArgument("p_geo_brd_id"); // input
        final List args = new ArrayList();
        args.add("2e531e62-2105-4522-978a-ab8baf19e273");// hardcoded for test
        final Object result = session.executeQuery(query, args);
        return result;
    And when I execute the query I get the following error:
    java.sql.SQLException: ORA-06550: Row 1, Column 13:
    PLS-00306: wrong number or types of arguments in call to 'GET_GEO_BRD_PROCEDURE'
    ORA-06550: Row 1, Column 7:
    PL/SQL: Statement ignored
    So both exceptions look quite similar.
    I guess in both cases the exception description leads to the assumption, that the wrong type for the return value / output parameter is used…
    So - how can a receive a MDSYS_SDO_GEOMETRY object from a stored procedure or stored function in Java ?
    What is wrong in the Java code?
    Thank you in advance for any suggestions!
    Yours,
    Chris
    Edited by: user3938161 on 20.12.2011 07:46
    Edited by: user3938161 on Dec 20, 2011 8:06 AM: added variable declaration of JGeometry geometry in source code

    Thanks, that did the trick! ;-)
    Here is now the code for stored procedure and function for anybody else encountering the same troubles... (be aware of the parameter order and/or naming!)
    Code for stored functions:
    final JpaCallback action = new JpaCallback() {
      @Override
      public Object doInJpa(final EntityManager em) throws PersistenceException {
         final Session session = JpaHelper.getEntityManager(em).getActiveSession();
           * Using CallableStatement for stored functions
          STRUCT st = null;
          CallableStatement cs = null;
          final DatabaseLogin login = session.getLogin();
          final Connection _conn = (Connection) login.connectToDatasource(session.getDatasourceLogin().buildAccessor(), session);
          try {
             try {
                cs = _conn.prepareCall("{? = call GET_GEO_BRD_FUNCTION(?)}");
                cs.registerOutParameter(1, OracleTypes.STRUCT, "MDSYS.SDO_GEOMETRY");
                cs.setString(2, "2e531e62-2105-4522-978a-ab8baf19e273");//TODO: hardcoded for test
                cs.execute();
             } catch (final SQLException e) {
                MyClass.LOG.error("An exception occured calling the stored procedure", e);
             if (cs != null) {
                //reading geometry from the database
                try {
                   st = (STRUCT) cs.getObject(1);
                } catch (final SQLException e) {
                   MyClass.LOG.error("An exception occured converting the query result to oracle.sql.STRUCT", e);
          } finally {
             try {
                if (_conn != null && !_conn.isClosed()) {
                    _conn.close();
             } catch (final SQLException e) {
                MyClass.LOG.error("An exception occured on closing the database connection.", e);
          return st;
    final STRUCT result = (STRUCT) this.getJpaTemplate().execute(action);
    The code for stored procedure solution:
    final JpaCallback action = new JpaCallback() {
      @Override
      public Object doInJpa(final EntityManager em) throws PersistenceException {
          final Session session = JpaHelper.getEntityManager(em).getActiveSession();
           * Using CallableStatement for stored procedure
          STRUCT st = null;
          CallableStatement cs = null;
          final DatabaseLogin login = session.getLogin();
          final Connection _conn = (Connection) login.connectToDatasource(session.getDatasourceLogin().buildAccessor(), session);
          try {
             try {
                cs = _conn.prepareCall("{call GET_GEO_BRD_PROCEDURE(?,?)}");
                cs.setString("p_geo_brd_id", "2e531e62-2105-4522-978a-ab8baf19e273");
                cs.registerOutParameter("sdo_geom", OracleTypes.STRUCT, "MDSYS.SDO_GEOMETRY");
                cs.execute();
              } catch (final SQLException e) {
                MyClass.LOG.error("An exception occured calling the stored procedure", e);
              if (cs != null) {
                //reading geometry from the database
                try {
                   st = (STRUCT) cs.getObject("sdo_geom");
                } catch (final SQLException e) {
                   MyClass.LOG.error("An exception occured converting the query result to oracle.sql.STRUCT", e);
           } finally {
              try {
                if (_conn != null && !_conn.isClosed()) {
                   _conn.close();
              } catch (final SQLException e) {
                MyClass.LOG.error("An exception occured on closing the database connection.", e);
            return st;
    final STRUCT result = (STRUCT) this.getJpaTemplate().execute(action);

  • How to retreive data from structure MDEZ in T.code CO09

    As per our requirement 2 new columns are needed in a customize report .i.e
    - u201Cinc. lot dateu201D
    - u201Cavailable inc. lotu201D
    u201Cinc. lot dateu201D:to get the values for inc.lot.date
    From second screen of CO09(program: SAPLATP4 and screen number: 400) pick first date where MRP element is u201CPOitemu201D, u201CShpgNtu201D or u201CPrdOrdu201D.
    u201Cavailable inc. lotu201D: to get the values for available inc.lot
    Pick u201CCum. ATP QTyu201D from the same row.
    These data are stored in structure MDEZ. Actually I want dat00 and MNG04 based on field DELB0. If DELB0 filed is POitem or Prdord or ShpgNt then only I should retrieve the dat00 and MNG04. IF there are more than one POitem in MRP element then we should pick the first POitems' mrp date and *** ATP qty  .Can you please help me out how to get these data from the structure MDEZ.
    input parameters to get the values are material number and plant.

    Hi,
    First of all data is never stored in structure so there is no way you can retrive data from structure.
    you are looking into the screen field and it is not mandatory that it will always point to a table.
    Now  the qestion remains how to get the data ?  you need to find database table for that field there are many ways like SE84 or SE11 where used etc.
    Try to find the table if you still have the problem feel free to get back.
    Regards
    Bikas

  • HT204053 How do I retreive my photo from photo stream?

    I just up graded to a iphone 5. I saved all my photo to photo stream. How do I retrieve them from my icloud account to download to my new iphone 5? Any help would be appreicate.
    Thanks,

    Welcome to the Apple Community.
    Just log into your iCloud account and enable photostream.

  • Geomtry to mdsys.sdo_geometry

    Hi, i'm a newbie of Oracle Spatial, i'm working with sdoapi, i need to convert
    geometries encoded with GML into valid geometries encoded in msdsys.sdo_geometry
    to perform query throug SQL over other geoemtries stored into a table.
    For example, if i've a box geometry in GML like this:
    <gml:Box>
         <gml:coord>
              <gml:X>-103</gml:X>
              <gml:Y>31</gml:Y>
         </gml:coord>
         <gml:coord>
              <gml:X>-103.5</gml:X>
              <gml:Y>31.5</gml:Y>
         </gml:coord>
    </gml:Box>
    I would make a query like:
    SELECT a.geometry
    FROM My_Spatial_Table a
    WHERE mdsys.sdo_relate(a.geometry, mdsys.sdo_geometry (2003, null, null,mdsys.sdo_elem_info_array (1,1003,3),mdsys.sdo_ordinate_array (-103,31,-103.5,31.5)),'querytype=WINDOW layer_gtype=notpoint') = 'TRUE';
    I've look in sdoapi's samples that i can make an adapter from my
    GML (XML) to Oracle's geometry, now i would know if i can map
    this geometry into a mdsys.sdo_geometry form.
    For geometries like point, box, there's no problems, but for geometries
    like polygon, linestring, multipolygon i don't know how do this! :-(
    Any tips or documentation for my problem?
    Best Regards
    Luigi

    Are you positive that the data is only being saved
    with 6 places of precisions ?
    As far as I remember SQLPlus only displays up to 6
    decimal points, although there are more in the data.
    I remember a similar thread on this before where
    there was a Tip that suggested setting the SQLPlus
    number format highr in order to display the full
    coordinates.
    e.g. SET NUMFORMAT 9999999999999999.99999999999999999999999;
    Ro

  • When i am retreiving the values from the access table i am getting null val

    hi all,
    I comeacross the following problem,I connected my applet to the Access database with jdbc:odbc driver.
    I am trying to retreive the values from the table.I am getting the result correctly when the same code with using applet it was giving the correct result.
    when I am using an applet program it was giving the null value istead of the actual records.
    can anybody tell me the reason why
    thanks in advance
    and also how to connect the databse in the webserver when i installed my applet in the client side
    please give me some suggestions to do that
    thankyou
    lakshman

    Hi Krishna,
    Can you please copy the code generated by ODI for creating your C$ table ?
    i mean :- create table C$_0Entity ( from the operator log
    Regards,
    Rathish A M

  • How do I stop Itunes from automatically changing the Category of a Song

    The Catgory of a song changes when I play it and other times that I can't figure out. How do I stop that from happening.

    No, don't check it!
    That is the only setting that would let itunes change file names. Read right underneath it - itunes will create files & folders based on artist & album name.
    Something else must be changing your files, then - not iTunes.
    Every PC comes with WIndows Media Player. Go into that and uncheck the options to retreive internet info for albums. It's in 2 places, on the Library tab and the Privacy tab.
    Message was edited by: Katrina S.

Maybe you are looking for

  • My brand new ipod touch 4th gen wont let me sync new songs to it

    I just got my new ipod touch 4th gen 2 days ago and it wont let me sync any new songs to it and it wont let me take any songs off it either. Ive tried rebooting it and restoring it serveral times and nothing seems to work. Also I updates my itunes an

  • Contract from srm to SAP R/3

    I made a account assigned pr(with cost centre) in SAP R/3, then i transferred it to SRM, and made a bid in SRM, after all I selected one bid and triggered a contract in SRM so that contract gets made in SAP r/3. Now the contract automatically picks a

  • Trip simulation error in WD ABAP

    Hi SDNers, We are using WD ABAP based travel management via ESS/MSS with EP 7.0 ECC 6.0 EhP4 landscape. We are trying to raise a travel request for various employees (pernrs), it gives the following error message. Trip can not be saved due to errors

  • Bookmarks toolbar - site icons have appeared in FF4 - how to remove the icons?

    I can find the option to disable all toolbar icons BUT specifically website icons have appeared in V4 in the bookmarks toolbar. This is annoying as the icons take up so much space - I can only fit half as many toolbar bookmarks. How can I disable the

  • How to start and stop video acquisitio​n in a state machine

    hello, I'm a neuroscience student and here's what I'm trying to do: 1) trigger a GigE camera (200fps), 2) start video acquisition, 3) trigger a light that will stay on for x miliseconds, 4) trigger a valve that will blow an air puff, 5) stop the tone