I need to read an Oracle (not spatial) table with OGR.
I have no problem with ogrinfo. I use this command:
ogrinfo -ro OCI:user/password -sql "select * from HR.EMPLOYEES"
I have this kind of output:
OGRFeature(select * from HR.EMPLOYEES):106
EMPLOYEE_ID (Integer) = 206
FIRST_NAME (String) = William
LAST_NAME (String) = Gietz
EMAIL (String) = WGIETZ
PHONE_NUMBER (String) = 515.123.8181
JOB_ID (String) = AC_ACCOUNT
SALARY (Real) = 8300.00
COMMISSION_PCT (Real) = (null)
MANAGER_ID (Integer) = 205
DEPARTMENT_ID (Integer) = 110
Now I would like to export (in example) in CSV format, using OGR. This is the command:
ogr2ogr -f "CSV" test.csv OCI:"user/password" -sql "select * from HR.EMPLOYEES"
I have this errors:
ERROR 4: Failed to create test.csv\select * from HR.EMPLOYEES.csv:
Invalid argument
ERROR 1: Terminating translation prematurely after failed
translation from sql statement.
I'm not able to find the syntax error. What's wrong?
I'm using gdal/ogr 1.9 and Oracle 11g for windows.
Thank you,
Andrea