Select to view content in your preferred language

Return Query Results from a map click event - using a related table...

437
0
04-14-2010 06:02 AM
BrentKastor
Emerging Contributor
Hello,

Here is my setup�?�

flex site - beta - http://gis.coweta.ga.us/cctax/index.html

SQL Server 2005
Database Name: sde_publication
Main Data Layer: gisadmin.wingapparcels (spatial view)
Main Data Layer Key Field: realkey

The Table I want to query through a parcel map click: gisadmin.saleinfo (has a realkey field that corresponds to gisadmin.wingapparcels)

My problem:  When a user clicks on a parcel, I would like to provide the user with the 2 most recent sales records (from these fields: gisadmin.saleinfo.saledate, gisadmin.saleinfo.saleprice)  much like the following website does: http://qpublic3.qpublic.net/ga_coweta.html?parcel=W09+++++++131&extent=2133091+1231089+2134415+12320...  The sales information is in a separate table with many sales to each parcel.

Additional Info:  The realkey field (in gisadmin.wingapparcels) is a unique Identifier that can be used to relate to the gisadmin.saleinfo table.  The realkey field is a one to many relationship from wingapparcels to saleinfo (one parcel to many sales).  I have done a query to select out the parcels that have had a sale during a specific time period �?? REALKEY in (select realkey from sde_publication.gisadmin.saleinfo where saledate >= �??2007-01-01�?? AND saledate <= �??2007-12-31�?? ).  This query selects all of the parcels sold in 2007.

Ultimately, I would like to return the results in the <esri: outFields>

Any ideas would be greatly appreciated!  Thanks!

I have a selection that should return the top saledate field from the related saleinfo table - RecentSale1.text = graphic.attributes.RealKey in (select TOP 1 saledate FROM sde_Publication.gisadmin.saleinfo ORDER BY saledate);
Tags (2)
0 Kudos
0 Replies