[mapguide-users] Help with joining tables please

Darren Karasiuk darren.karasiuk at aldatasoftware.com
Thu Mar 26 17:07:21 EDT 2009


Hi Dave, thank you for the suggestions. I am using a single database and
trying to join tables within them.

I agree that using a View is the best choice, because that also allows me to
adjust time zones.

 

The problem I'm having now is MapGuide Studio will NOT display my GPS_LAT
and GPS_LON fields when setting up the geometry. Out of 39 columns, only
five are selectable.

One thing that appears different is for the native table, only two columns
are listed as "key" fields and they are not the GPS_LAT/LON columns.  My new
view has almost all of the columns as a "key" field including the lat/lon
columns.

How can I move the "key" fields to the selectable x, y columns?

 

Darren

 

  _____  

From: mapguide-users-bounces at lists.osgeo.org
[mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Dave Wilson
Sent: March 26, 2009 8:39 AM
To: MapGuide Users Mail List
Subject: RE: [mapguide-users] Help with joining tables please

 

Of course if both tables are in the same database instance you might get
your DBA to create a view joining the two tables for you. The performance
would be better.

 

Dave

 

From: mapguide-users-bounces at lists.osgeo.org
[mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Dave Wilson
Sent: Wednesday, March 25, 2009 5:23 PM
To: MapGuide Users Mail List
Subject: RE: [mapguide-users] Help with joining tables please

 

Can we assume your spatial data is in tableA and you are using a Spatial
provider connection? For table B I would suggest using an ODBC connection
via a DSN. You don't need the overhead of the spatial provider stuff for the
joined table.

 

The same should apply when joining to SDF. In almost all cases the join
should use an ODBC connection to the secondary data.

 

Dave

 

From: mapguide-users-bounces at lists.osgeo.org
[mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Darren Karasiuk
Sent: Wednesday, March 25, 2009 4:47 PM
To: 'MapGuide Users Mail List'
Subject: [mapguide-users] Help with joining tables please

 

Hello, I've been fighting with this for a while and need your help.

 

I want to combine a few tables together and have that data available for
themeing and viewing.

Without attempting to join tables, the data loads without any problem.
However, I have not been able to get tables joined.

 

Using normal SQL Server 2008 "inner join tableB on tableA.location =
tableB.location" is what I'm trying to do.

Using the Autdesk Mapguide Studio, I click through, set up my joining tables
exactly as I would in SQL.

In the layer definition editor, I see the new attributes.

Before doing anything else, I export the layer as XML and test my map.  The
map viewer doesn't stop showing the busy icon, the legend labels become
question marks (?) and no data ever loads.  If I disable the layer, all the
other layers show quickly.

 

I've tried using the same database connection, a different database
connection, and a SDF imported from a shapefile. No method appears to work
for me.

 

Is there a proper way of setting up joining tables? Should I learn the XML
syntax and do it manually?

 

Thanks for your help,

 

Darren

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapguide-users/attachments/20090326/9d4bcfbc/attachment.html


More information about the mapguide-users mailing list