Specifying  spatial column in USER_SDO_GEOM_METADATA with subtype

How do I specify the spatial column in USER_SDO_GEOM_METADATA when the
column is of a subtype? I have a table of type 'SPATIAL_OBJECT' with
subtypes for links and nodes, containing the SDO_GEOMETRY attributes.
TREAT does not appear to work.

"The problem I have is making the spatial columns of the subtypes visible in USER_SDO_GEOM_METADATA. Its also not a function - I have the geometry objects in the subtypes, I just need to make them visible to index them." - but this is exactly what is being shown in the example.
For instance, if I have a table called 'cola_markets_2' with a column called 'market', that is made up of a user-defined type called 'market_types' whereby 'shape' is of the type SDO_GEOMEMETY and all I want to do is insert the reference of the sub-type for into USER_SDO_GEOM_METADATA for indexing purposes I can simply use dot notation to do so:
INSERT INTO user_sdo_geom_metadata
(TABLE_NAME,
COLUMN_NAME,
DIMINFO,
SRID)
VALUES (
'cola_markets_2',
'market.shape',
SDO_DIM_ARRAY( -- 20X20 grid
SDO_DIM_ELEMENT('X', 0, 20, 0.005),
SDO_DIM_ELEMENT('Y', 0, 20, 0.005)
NULL -- SRID
Then, to index the table and sub-type I use the same dot notation:
CREATE INDEX cola_spatial_idx_2
ON cola_markets_2(market.shape)
INDEXTYPE IS MDSYS.SPATIAL_INDEX;
Have you tried this yet? This will not break anything and from what you say this is exactly what you are looking for. I guess I am not understanding why you would be looking at functions or member functions when you say you "have the geometry objects in the subtypes" and "just need to make them visible to index them". This is how to do it.
Does this make sense?
-Justin

Similar Messages

  • Replicate Table with spatial columns

    I'd like to know how to
    replicate (updatable snapshot) a table
    with spatial columns.
    when i try to create a master repobject
    i've got ORA-23318 error.
    What can i do?
    null

    Hi Vincent,
    Oracle does not support replication of object in 8.1.6 or 8.1.7. I believe replication support is expected for the version after.
    Sorry,
    Dan

  • Is it mandatory to populate USER_SDO_GEOM_METADATA for each spatial column ?

    Hello,
    I would like to know if we HAVE to populate the metadata table for a geometry column that will never be indexed.
    (I know that in the documentation it is said "For each spatial column,
    you must insert an appropriate row into the USER_SDO_GEOM_METADATA view.")
    Thanks
    Hugues

    Hi Hugues,
    There are many spatial operations that make use of the user_sdo_geom_metadata table, not all of them index related (operators).
    If your data hasn't been migrated to 8.1.6 format then not much will work if user_sdo_geom_metadata is not populated.
    If your data is migrated:
    You won't be able to validate your data (we check the data to the bounds of the coordinate system).
    You won't be able to use linear referencing (also known as dynamic segmentation).
    You won't be able to use any spatial operators (which require a spatial index).
    You won't be able to use coordinate systems (or least some parts of coordinate systems).
    The above might only be a partial list.
    hope this helps, and regards,
    dan

  • Performance problem on view with spatial column - resolved

    I have had a problem with queries on a view that had a spatial column, where the view did not belong to the logged in user. Where my spatial window was retrieved by a sub-query, the spatial scan did a full table scan instead of using the spatial index.
    I have found that the problem can be resolved by granting MERGE VIEW on the view to the querying user.
    The view can be as simple as SELECT * FROM table.
    The badly performing query could be as simple as
    select id from T1.tstview
    where SDO_RELATE(coordinates,
    (SELECT coordinates FROM T1.tstWINDOW WHERE ID = '1')
    ,'mask=INSIDE+COVEREDBY querytype=WINDOW') = 'TRUE'  ;
    I think this is a bug, and have raised an SR - MERGE VIEW is supposed to override issues with the "security intent" of a view.
    The workaround is simple enough once you're aware of it and I thought it was worth passing on.

    Thanks for sharing this workaround!
    Which ORACLE version did you test ?

  • Cluster table with Spatial column

    Hi,
    I tried to create a spatial table(with one SDO_GEOMETRY column) with cluster on one attribute column. But I keep getting error ORA-03001: unimplemented feature.
    Is this mean that I can not cluster a table with SDO_GEOMETRY column?
    Thanks
    Helen

    Hi Helen,
    The parameter you mention is only for real application clusters, not for clustering columns of tables.
    As far as I can tell, when clustering columns of different tables together Oracle will try to
    store all of the data associated with those tables together on disk.
    The Oracle Spatial geometry datatype (mdsys.sdo_geometry) includes two varray types of
    length 1048576. Because these varrays can hold so much data Oracle "makes arraingements"
    to store data in these columns outside of the table in a lob segment (in reality, data is only
    stored out-of-line if there is over 4kb of data in the varray).
    Because of this (no ability to ensure the spatial data is stored with the clustering columns),
    the clustering mechnism is disabled when you have spatial data.
    I read through the doc and it is unclear - the only restriction I could find is using these columns
    as the clustering key.
    Hope this helps,
    Dan

  • Problem by adding one spatial column to the version-enabled table

    Hello, I'm trying to modify one version-enabled table T1 like this:
    --table definition
    create table T1
    (ID NUMBER NOT NULL PRIMARY KEY,
    NAME VARCHAR2 (256),
    FUNCTION VARCHAR2 (256));
    --enable versioning
    EXECUTE DBMS_WM.EnableVersioning('T1','VIEW_WO_OVERWRITE');
    I'd like to add one spatial column to this table by:
    -- modify metada view for spatial indexing
    INSERT INTO USER_SDO_GEOM_METADATA (TABLE_NAME, COLUMN_NAME, DIMINFO, SRID)
    VALUES ('T1_LT', 'ANCHOR',
    MDSYS.SDO_DIM_ARRAY
    (MDSYS.SDO_DIM_ELEMENT('X', 0.000, 100000.000, 0.0005),
    MDSYS.SDO_DIM_ELEMENT('Y', 0.000, 100000.000, 0.0005),
    MDSYS.SDO_DIM_ELEMENT('Z', -100, 1000, 0.0005)) , 81989002);
    -- table modification - add a column and create a spatial index
    EXECUTE DBMS_WM.BeginDDL('T1');
    ALTER TABLE T1_LTS ADD ("ANCHOR" MDSYS.SDO_GEOMETRY);
    CREATE INDEX T1_SPX on T1_LTS(ANCHOR) INDEXTYPE is MDSYS.SPATIAL_INDEX;
    EXECUTE DBMS_WM.CommitDDL('T1');
    By finishing of the DDL operation with EXECUTE DBMS_WM.CommitDDL('T1') I get an error message:
    "SQL> EXECUTE DBMS_WM.CommitDDL('T1');
    BEGIN DBMS_WM.CommitDDL('T1'); END;
    ERROR at line 1:
    ORA-20171: WM error: 'CREATE TABLE' and 'CREATE SEQUENCE' privileges needed.
    ORA-06512: at "SYS.WM_ERROR", line 342
    ORA-06512: at "SYS.WM_ERROR", line 359
    ORA-06512: at "SYS.LTUTIL", line 8016
    ORA-06512: at "SYS.LT", line 11925
    ORA-06512: at line 1
    What is wrong here? The Oracle 10g DB is installed on Windows 2003 Server, OWM_VERSION - 10.2.0.1.0.
    Regards,
    Viktor

    Hi,
    You need to explicitly grant the create table and create sequence privileges to the user owning the table. It is not enough for these to be granted by using a role. This restriction is documented in the user guide.
    Also, you should add the entry in the user_sdo_geom_metadata view on the t1_lts table, which is the table to which you are actually adding the geometry column, after calling beginDDL. CommitDDL will make the necessary changes, which in this case would be to add an entry for both t1 and t1_lt.
    Regards,
    Ben

  • Column alias for spatial column within cursor loop using dynamic SQL

    The following PL/SQL is trying to generate an error report for records or objects which are 3 dimensional or above. I have no issue execute one statement in SQLPLUS but I need to use the column alias for the spatial column. But, it is a different story using PL/SQL and dynamic SQL Any help will be great because I've been working on this for than 8 hours but with no luck! Thanks.
    Here is the error I'm getting,
    stmt := 'select p.column_name.get_gtype(), id from '|| table_name p ' where p.column_name.get_gtype() > 2 ';
    ERROR at line 15:
    ORA-06550: line 15, column 79:
    PLS-00103: Encountered the symbol "P" when expecting one of the following:
    . ( * @ % & = - + ; < / > at in is mod remainder not rem
    <an exponent (**)> <> or != or ~= >= <= <> and or like LIKE2_
    LIKE4_ LIKEC_ between || member SUBMULTISET_
    The symbol "* was inserted before "P" to continue.
    and my PL/SQL is,
    set serveroutput on size 100000 feedback off
    declare
    rs integer;
    rs1 integer;
    cur integer;
    rp integer;
    trs integer;
    n integer;
    un varchar2(30);
    stmt varchar2(200);
    begin
    dbms_output.put_line(rpad('Table Name',40)||' Dimension');
    dbms_output.put_line(rpad('-',53,'-'));
    cur:= dbms_sql.open_cursor;
    for t in (select column_name,table_name from user_sdo_geom_metadata where regexp_like(table_name, '[^[A-B]_[AB]$'))
    loop
    stmt := 'select p.column_name.get_gtype(), id from '|| table_name p ' where p.column_name.get_gtype() > 2 ';
    dbms_sql.parse(cur, stmt, dbms_sql.native);
    dbms_sql.define_column(cur, 1, rs);
    dbms_sql.define_column(cur, 2, rs1);
    rp:= dbms_sql.execute(cur);
    n:=dbms_sql.fetch_rows(cur);
    dbms_sql.column_value(cur, 1, rs);
    dbms_sql.column_value(cur, 2, rs1);
    dbms_output.put_line(rpad(t.table_name,38,'.')||rpad(rs,15)||rpad(rs1,15));
    end loop;
    dbms_sql.close_cursor(cur);
    dbms_output.put_line(rpad('-',53,'-'));
    end;
    set serveroutput off feedback on feedback 6

    The following PL/SQL is trying to generate an error report for records or objects which are 3 dimensional or above. I have no issue execute one statement in SQLPLUS but I need to use the column alias for the spatial column. But, it is a different story using PL/SQL and dynamic SQL Any help will be great because I've been working on this for than 8 hours but with no luck! Thanks.
    Here is the error I'm getting,
    stmt := 'select p.column_name.get_gtype(), id from '|| table_name p ' where p.column_name.get_gtype() > 2 ';
    ERROR at line 15:
    ORA-06550: line 15, column 79:
    PLS-00103: Encountered the symbol "P" when expecting one of the following:
    . ( * @ % & = - + ; < / > at in is mod remainder not rem
    <an exponent (**)> <> or != or ~= >= <= <> and or like LIKE2_
    LIKE4_ LIKEC_ between || member SUBMULTISET_
    The symbol "* was inserted before "P" to continue.
    and my PL/SQL is,
    set serveroutput on size 100000 feedback off
    declare
    rs integer;
    rs1 integer;
    cur integer;
    rp integer;
    trs integer;
    n integer;
    un varchar2(30);
    stmt varchar2(200);
    begin
    dbms_output.put_line(rpad('Table Name',40)||' Dimension');
    dbms_output.put_line(rpad('-',53,'-'));
    cur:= dbms_sql.open_cursor;
    for t in (select column_name,table_name from user_sdo_geom_metadata where regexp_like(table_name, '[^[A-B]_[AB]$'))
    loop
    stmt := 'select p.column_name.get_gtype(), id from '|| table_name p ' where p.column_name.get_gtype() > 2 ';
    dbms_sql.parse(cur, stmt, dbms_sql.native);
    dbms_sql.define_column(cur, 1, rs);
    dbms_sql.define_column(cur, 2, rs1);
    rp:= dbms_sql.execute(cur);
    n:=dbms_sql.fetch_rows(cur);
    dbms_sql.column_value(cur, 1, rs);
    dbms_sql.column_value(cur, 2, rs1);
    dbms_output.put_line(rpad(t.table_name,38,'.')||rpad(rs,15)||rpad(rs1,15));
    end loop;
    dbms_sql.close_cursor(cur);
    dbms_output.put_line(rpad('-',53,'-'));
    end;
    set serveroutput off feedback on feedback 6

  • Solution to allow users to specify which columns of a sql report to search

    Starting Point:
    1) You have an existing SQL Report.
    2) You want to provide functionality to search through the result set.
    Start -----
    1) add a text_item for searching PX_search where X is page number
    2) add a button which resubmits the page. Go
    3) You modify your query by adding the following to the end of the where clause.
    and (PX_SEARCH is null or instr(column_name1,PX_SEARCH) > 0 )
    4) So far so good but it only allows searches on 1 column, so you add a few other columns
    and (PX_SEARCH is null or instr(column_name1,PX_SEARCH) > 0 or instr(column_name2,PX_SEARCH) > 0 or instr(column_name3,PX_SEARCH) > 0 )
    Now when you enter some text if it is in any of the columns that row will be displayed.
    This can be good or bad depending on your requirement. lets say my users want to specify the column they are searching on.
    5)further enhancement
    i) add a LOV to your page which queries the all_users data dictionary view
    select column_name d, column_name r from all_users where table_name = 'MY_TABLE_NAME' and column_name not in ('COLUMN_NAME1,COLUMN_NAME2) order by column_name
    The idea here is to use the oracle data dictionary to get all the columns for your table(s) and ignore the columns you do not want.
    ii) add an item to your page e.g. PX_select_column which gets populated from the list of values.
    Now for each column you are going to allow a search on, the sql needs to be modified.
    Lets pretend that my firstcolumn is called member_id, my second column is called firstname and my third column is lastname
    Before we had this SQL
    (select * from table where 1=1)
    and (PX_SEARCH is null or instr(memberid,PX_SEARCH) > 0 or instr(firstname,PX_SEARCH) > 0 or instr(lastname,PX_SEARCH) > 0 )
    Remember we have added PX_SELECT_COLUMN which should contain what we have selected from the LOV.
    iii) So now we modify the query to be as follows:
    and (PX_SEARCH is null or decode(:PX_SELECT_COLUMN,'MEMBERID',instr(memberid,PX_SEARCH),0) > 0 or
    decode(:PX_SELECT_COLUMN,'FIRSTNAME',instr(firstname,PX_SEARCH),0) > 0 or
    decode(:PX_SELECT_COLUMN,'LASTNAME',instr(lastname,PX_SEARCH),0) > 0 )
    The user can now choose which column to filter their results on.

    Here is a basic one (http://apex.oracle.com/pls/otn/f?p=2230:1). You can select an object type and put in criteria for the object name like '%b%'. The SELECT statement is dynamically generated with only the pieces of the WHERE clause that are needed. You do not need all the DECODE and INSTR OR logic.
    The main part of this example is the computation of the SQL SELECT statement:
    DECLARE
      v_sql VARCHAR2(2000) := 'SELECT *'||CHR(10)||'  FROM USER_OBJECTS';
      v_and BOOLEAN := FALSE;
      v_where VARCHAR2(2000);
    BEGIN
      -- P1_OBJECT_TYPE has value of 'ALL' for '%'
      IF (:p1_object_type != 'ALL') THEN
        v_sql := v_sql || chr(10) ||
                 ' WHERE object_type = '''||:p1_object_type||'''';
        v_and := TRUE;
      END IF;
      IF (:p1_object_name IS NOT NULL) THEN
        IF (v_and) THEN
          v_sql := v_sql || chr(10) ||
                   '   AND object_name LIKE UPPER('''||:p1_object_name||''')';
        ELSE
          v_sql := v_sql || chr(10) ||
                   ' WHERE object_name LIKE UPPER('''||:p1_object_name||''')';
        END IF;
        v_and := TRUE;
      END IF;
      :p1_sql := v_sql;
      RETURN (v_sql);
    END;Mike

  • How can we get Dynamic columns and data with RTF Templates in BI Publisher

    How can we get Dynamic columns and data with RTf Templates.
    My requirement is :
    create table xxinv_item_pei_taginfo(item_id number,
    Organization_id number,
    item varchar2(4000),
    record_type varchar2(4000),
    record_value CLOB,
    State varchar2(4000));
    insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'USES','fever','TX');
    insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'HOW TO USE','one tablet daily','TX');
    insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'SIDE EFFECTS','XYZ','TX');
    insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'DRUG INTERACTION','ABC','TX');
    insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'OVERDOSE','Go and see doctor','TX');
    insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'NOTES','Take after meal','TX');
    select * from xxinv_item_pei_taginfo;
    Item id Org Id Item Record_type Record_value State
    493991     224     1265-D30     USES     fever     TX
    493991     224     1265-D30     HOW TO USE     one tablet daily     TX
    493991     224     1265-D30     SIDE EFFECTS     XYZ     TX
    493991     224     1265-D30     DRUG INTERACTION     ABC     TX
    493991     224     1265-D30     OVERDOSE      Go and see doctor     TX
    493991     224     1265-D30     NOTES     Take after meal     TX
    Above is my data
    I have to fetch the record_type from a lookup where I can have any of the record type, sometime USES, HOW TO USE, SIDE EFFECTS and sometimes some other set of record types
    In my report I have to get these record typpes as field name dynamically whichever is available in that lookup and record values against them.
    its a BI Publisher report.
    please suggest

    if you have data in db then you can create xml with needed structure
    and so you can create bip report
    do you have errors or .... ?

  • Why do I get a class conflict between the Prepare SQL.vi and the Get Column Name.vi with the SQL Toolkit compatibility vis from the Database Connectivity Toolkit?

    I have done extensive programming with the SQL Toolkit with LabVIEW versions through 6.1. My customer now wants to upgrade to Windows 7, so I am trying to upgrade to LabVIEW 2009 (my latest purchased version) using the Database Connectivity Toolkit, and the SQL Toolkit Compatibility vis. Everything seemed to be going okay with the higher level SQL operations, but I ran into trouble with the Get Column Name.vi. 
    The pictures below show the problem. The original SQL Toolkit connected the Prepare SQL.vi with the Get Column Name.vi with a cluster of two references, one for connection, and one for sql. The new compatibility vis have a class conflict in the wire because the Prepare SQL.vi contains a cluster with connection, and command references, but the Get Column Name.vi expects a cluster with connection and recordset references. 
    How do I resolve this conflict?
    Thank You.
    Dan

    I've never worked with the old version of the toolkit, so I don't know how it did things, but looking inside the SQL prep VI, it only generates a command, and the the column name VI wants a recordset. I'm not super familiar with all the internals of ADO, but my understanding is that is standard - you only have the columns after you execute the command and get the recordset back. What you can apparently do here is insert the Execute Prepared SQL VI in the middle and that will return what you need.
    I'm not sure why it worked before. Maybe the execute was hidden inside the prep VI or maybe you can get the column names out of the command object before execution. In general, I would recommend considering switching to the newer VIs.
    Try to take over the world!

  • How does schedule with RESTful API a Webi report for a group of users ("Schedule For" to "Schedule for specified users and user groups" with one or more users/groups)?

    SAB BO 4.1 SP1
    Does it have an RESTful API to schedule a Webi report with the parameter to specify a group of users ("Schedule For" to "Schedule for specified users and user groups" with one or more users/groups)?

    Hello Ricardo,
    have you try a call like this one ?
        <schedule>
          <name>"test"</name>"
          <format type=\"webi\"/>
          <destination>
            <inbox>
             <to>userId1,userId2,userId3,groupId1,groupId12</to>
            </inbox>
          </destination>
        </schedule>
    Regards
    Stephane

  • None of the fact sources for [column] are compatible with the detail filter

    Hi Experts,
    I am using obiee 11.1.1.7.
    Getting below error when i add a filter of non conformed dimension column.
    Below is the error
    Error Details
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P 
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 43119] Query Failed: [nQSError: 14023] None of the fact sources for [column] are compatible with the detail filter
    Please help in solving an issue.
    Regards,
    NN

    Hi NN
    You need to follow steps in below link to model your BMM layer for the report to work with non confirmed dimensions.
    http://obibb.wordpress.com/2010/05/31/multiple-fact-reporting-on-non-conforming-dimensions/
    Once you have followed these steps you can use the non confirmed dimension in the reports.When you see the logs to see the query generated by obiee,it generated 2 queries 1 with confirmed dimension and other with non conformed dimension.When you filter using non confirmed dimension you will now not notice any error but the results will not be filtering out because the filter will be applied only in 1 query which is valid
    Now for this to work what you can do is ,instead of using the filter drag the column you like to filter as a prompt in your view.default it to the value you need using the case statement and hide it.This is one of the work around.
    There may be many other work arounds for this but you need to understand that for you requirment to work you need to tweek OBIEE to generate 1 query instead of 2  queries.

  • Issue with Subtyping and Autoboxing

    Hi,
    I have a problem with subtyping and autoboxing. Can anybody please help me to know the reason for this.
    public class GenericSubType<T extends Integer> {
        T iVal;
        public GenericSubType(T t){
            iVal = t;
        public static void main(String args[]) {
            GenericSubType<Integer> gst = new GenericSubType<Integer>(30);
            System.out.println("gst.iVal = " + gst.iVal);
    The above code is giving a compile time error saying that:
    GenericSubType.java:8: cannot find symbol
    symbol : method valueOf(int)
    location : bound of type variable T
    GenericSubType<Integer>gst = new GenericSubType<Integer>(30);
    Fatal Error: Unable to find method valueOf
    If we change <T extends Integer> to <T extends Number> in the class declaration the compile time error will be resolved and the program works as expected.
    class GenericSubType<T extends Number> {
      // Body of the class...
    }Can anybody tell what is the problem with the original code and how it is affecting?
    Expecting a justifiable reason.
    Regards,
    Thomas.

    Why shouldn't I compile unnecessary statements? You only would see a warning on unnecessary cast here ;)
    The OP instead is introducing a generic parameter having a final class as bound, which pointless as for any instance the generic argument could be nothing but that very class. Why would anyone need it?
    I'm quite sure it's a javac bug (or maybe optimization issue in javac) in the combined play of autoboxing and generics. I'd say it tries to autobox the int into a T without taking into account that T always is Integer. But T obviously has no valueOf(int) method.

  • How to swap column-data along with Table header

    Hi All!
    I found a smple JTableDemo.java class. When I run it it provided sorting on the table as well as Dragging Column-data along with Table header while swaping two columns-headers.
    I designed my own table and apply some changes to TableModel. Afterwords it swaps Table-Headers only, but not their respective columns.
    Can someone give me a clue for that, where the logical error may be?
    Thanx in Advance

    surprised.. since you have asked, it must have some more tricky issue. Any way what i thought of it
    in before insert on table2
    simply insert into table1 (cr_id) values (:new.cr_id_id);
    i assume that table1 pk does not generated through sequence
    proposed insertion will not violate the uniqueness and create another record only in table1
    what is thehidden agenda for not using simple before insert trigger as above.
    yours
    dr.s.r.bhattachar

  • Oracle 8i DATE column returned wrong with 9i thin driver

    I have an Oracle 8i database with a column named "timestamp" with the following column metadata:
    DATA_TYPE=93
    TYPE_NAME=DATE
    I execute the following statement:
    select "timestamp" from oracle_data_log
    When I look at the result set metadata using the Oracle 9i drivers, I get (as expected):
    getColumnType=93
    getColumnTypeName=DATE
    getColumnClassName=java.sql.Timestamp
    When I look at the result set metadata using the Oracle 9i drivers, I get:
    getColumnType=91
    getColumnTypeName=DATE
    getColumnClassName=java.sql.Timestamp
    That column type 91 indicates it is SQL type DATE which is for date only values (no time information).
    Our code (working against many different databases with many different drivers) works off the column type metadata and messes up. (Obviously I can look at the column class name string as well / instead, but I'd like the column type to come back with the proper SQL type.)
    As I said, it works as expected with the 8i thin driver (and the DataDirect JDBC driver).

    Thanks for the info.
    It seems to me that returning a SQL type DATE (which means it only stores date information) for an Oracle DATE type (which stores date and time information) is the wrong thing to do. The Oracle DATE type stores date and time information which corresponds to the SQL TIMESTAMP type. It should return TIMESTAMP as the SQL type.
    It seems like it would confuse a client application into thinking there is no time information available, which there is.
    A friend suggested that since a SELECT on a DATE value only displays the date portion and not the time portion, that might be why they did it, but that still doesn't sound right. The Oracle DATE type stores date and time which corresponds to the SQL TIMESTAMP type.
    I guess they might have done it to distinguish between Oracle DATE and TIMESTAMP types, but I still don't like it...
    I wonder if there is any documentation on why Oracle made the decision?

Maybe you are looking for