[gdal-dev] ogr, vrt - connecting to arcsde errors only with srcsql

Even Rouault even.rouault at mines-paris.org
Mon Oct 3 13:50:50 EDT 2011


Le lundi 03 octobre 2011 19:17:25, Duarte Carreira a écrit :
> Hi there.
> 
> I'm having trouble using a SrcSQL tag in a vrt that connects to an ArcSDE
> feature class.
> 
> If I use SrcLayer everything works.
> 
> But if I remove SrcLayer, and add a SrcSQL with the simplest of queries
> (SELECT * FROM USER.TABLE1) I get errors in ogrinfo:
> 
> ERROR 1: SQL Expression Parsing Error: syntax error
> ERROR 1: SQL statement failed, or returned no layer result:
> SELECT * FROM GDBMAN.SREGA_PERIMETROS_REGA
> ERROR 1: SQL Expression Parsing Error: syntax error
> ERROR 1: SQL statement failed, or returned no layer result:
> SELECT * FROM GDBMAN.SREGA_PERIMETROS_REGA
> FAILURE:
> Unable to open datasource `sde_Regadio_SQL.vrt' with the following drivers.
> 
> Any idea why this is?

I guess it is because of the . in the table name. You should surround the 
table name by simple quote character.

SELECT * FROM 'USER.TABLE1'

> 
> Thanks,
> Duarte


More information about the gdal-dev mailing list