Hi all,

I am into some issues when trying to do a join using a shape file as a primary table and an ODBC (sql server 2005) connection as the secondary table.

The issue has to do with the schema name.

The following query (with a schema name: imsv7) works as expected:
- ogrinfo ODBC:sa/t...@my_db -sql "SELECT * FROM imsv7.COMPSMN WHERE COMPKEY=23533"

This same query without a schema does not work  (which is what  I expected):
- ogrinfo ODBC:sa/t...@my_db -sql "SELECT * FROM COMPSMN WHERE COMPKEY=23533"

My issue is that I need to give the schema name when doing a join but don't see how I can do that. Here is the join statement:

- ogrinfo f:/msapps/ttt/sqlserver/Sewer_Manholes_20090818.shp -sql "SELECT * FROM Sewer_Manholes_20090818 shp LEFT JOIN 'ODBC:sa/t...@my_db'.COMPSMN ON shp.COMPKEY = COMPSMN.COMPKEY where COMPKEY = 23533"


The ODBC part of this join ends up being translated into an sql select statement without a schema and It fails.
I did not see a way to specify the schema in any part of the join statement.

Is there some thing that I am missing?

Thanks

best regards,



--
----------------------------------------------------------------
Assefa Yewondwossen Software Analyst Email: ass...@dmsolutions.ca http://www.dmsolutions.ca/

Phone: (613) 565-5056 (ext 14)
Fax:   (613) 565-0925
----------------------------------------------------------------


_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to