Oracle - Converting SDO_GEOMETRY to WKT?

Viewed 18929

I am very new to oracle spatial.

I have a spatial table with one SDO_GEOMETRY column. After inserting POINT data in this table, I want to retrieve data in WKT format.

Here is what I did:

Inserting data -

INSERT INTO new_test (name, geom) VALUES (
'Test', 
SDO_GEOMETRY(
             2001,
             4326, 
             SDO_POINT_TYPE(12,14,NULL), 
             NULL, 
             NULL));

Fetching data -

SELECT NAME, SDO_UTIL.TO_WKTGEOMETRY(GEOM) AS point FROM NEW_TEST;

Output -

NAME | POINT
-------------
Test | (null)

Why do I get null here? Shouldn't it display the co-ordinate points?

2 Answers
Related