[Gdal-dev] OCI-Import

Stephan Holl sholl at gmx.net
Wed Jan 4 05:38:43 EST 2006


Dear List,

I have imported some datasets with OGR using GRASS v.out.ogr. When I
log into Oracle using sql*plus I cannot run a select-statement on the
dataset without quoting the column-names:

SELECT column FROM dataset;
ERROR at line 1:
ORA-00904: "COLUMN": invalid identifier

SELECT "column" FROM dataset; works.

I have found out, that the columns OGR_FID and ORA_GEOMETRY can be
selected without quotes, but for all attribute-columns the quotes are
needed.

I was also told, that this results from the initial CREATE TABLE
statement, which was done by OGR, where the attribute-columns
were enclosed in quotes, something like this:

create table dataset (
     OGR_FID number(38),
     ORA_GEOMETRY MDSYS.SDO_GEOMETRY,
     "cat" number(38),
     "column" number(38),
     [...]
  ..... ) storage (...) tablespace ... ;

For a select-statement the columns needs to be in quotes as well,
otherwise Oracle does not recognize the column-name correct.

Is this a bug or a feature? Does anybody can give me a hint how to get
arround this?

Best regards

	Stephan
-- 
Stephan Holl

Check headers for GnuPG Key!
http://www.gdf-hannover.de

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/gdal-dev/attachments/20060104/44072267/signature.bin


More information about the Gdal-dev mailing list