[Mapserver-users] Multiple DSN Problem
Frank Warmerdam
warmerdam at pobox.com
Tue Jul 20 06:49:05 PDT 2004
D'cruz,Steven [Ontario] wrote:
> Hi there,
>
> I was wondering if anyone has any experience with executing
> select statements using two different DSNs simultaneously. For my work,
> I require functionality similar to the following: "select a.* from
> tablename1 a, tablename2 b where a.id=b.id and b.filter='t'" , where
> tablename1 and tablename2 are from 2 DIFFERENT DSNs. Both DSNs are to
> be accessed via a realtime connection to a MS Access 2000 database from
> a linux host via the FREETDS drivers. I currently have both DSNs
> working independently in 2 test layers (with no errors) using the
> required fields. Here's the .ovf file used for the selection queue from
> the MS Access 2000 databases.
Steven,
Are the two tables you are interested in within the same MS-SQL database?
If so, you should be able to just do your join in a single SrcSQL statement.
Any SQL that the remote ODBC database supports can be in the SrcSQL
statement.
OGR SQL also has a built-in join syntax when you are working against
non-SQL enabled databases that allows accessing tables from different
datasources but that would be hard to make kick in when using stuff over
ODBC.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
More information about the MapServer-users
mailing list