Hi,
I'm trying to load oracle table with sql expression like explain here:
http://blog.georepublic.info/2013/joining-tables-with-sql-using-pyqgis/
My python code:
uriOracle = QgsDataSourceURI()
uriOracle.setSrid("EPSG:3948")
uriOracle.setConnection('xxxxxxxx', 'xxxxx','xxxxx', 'consultsig','consultsig')
uriOracle.setDataSource( "", "(select * from COMMUNE sort by ccocom)", "GEOM",
"","id")
layer = QgsVectorLayer(uriOracle.uri(), 'communes', 'oracle')
if not layer.isValid():
print "Layer failed to load!"
But layer is not valid.
Did I miss something?
(I want to load layer but already sorted on a field value...)
Thanks
Sylvain
_______________________________________________
Qgis-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-user