Hi Terry,

In SQL you can issue a SELECT MAX(ASC(gen)) and use the CHR$() function on the returned ascii values to get the generation characters.

HTH

Best regards / Med venlig hilsen
Lars Nielsen
GisPro



Terry McDonnell wrote:

Hi Foilks

I have a table of bus routes, where each route has a route number and a
generation key.  e.g. the original route has a gen of "A".  When the
route is revised, the next gen is "B" and becomes the current operating
route, and so on.  The previous generations stay on file though.

Now when we want to get route info, via SQL, into, say, a browse, we're
only interested in the latest gen.  But not ALL routes will be at the
same gen;  some may be still gen A while others can be anything up to
"Z".  I tried the MAX( gen) function in the SQL but MI wouldn't have
that.  So I'm stuffed.  Can't figure out how to dynamically select the
latest gen for each of a bunch of disparate routes that I might want in
the list. (e.g. list all the routes that stop at this stop, or pass
through this polygonal zone)

Any ideas/solutions?

'ppreciate it

Terry McDonnell
_______________________________________________
MapInfo-L mailing list
[email protected]
http://www.directionsmag.com/mailman/listinfo/mapinfo-l

_______________________________________________
MapInfo-L mailing list
[email protected]
http://www.directionsmag.com/mailman/listinfo/mapinfo-l

Reply via email to