Hi Arnaud,

Just noticed that the search was typed in wrong. It should be:

QUERY([City];[City]country code=$cntryCode)                             
QUERY SELECTION([City];[City]longitude>=$lon_r;*)
QUERY SELECTION([City]; & ;[City]longitude<=$lon_r+1)

John…


> In this case I am searching by country (or country code) and longitude to 
> find (if found) an Olson TimeZone. The fastest search I've found so far 
> (B-Tree index):
> 
>   // [PE_Geo_Location]lon_dec = 28.6
>   // [PE_Geo_Location]Country_Code = RU
> 
> GEO_GetTimeZone([PE_Geo_Location]Country_Code;[PE_Geo_Location]lon_dec)
> 
> $cntryCode:=$1
> $lon_r:=Int($2)    // 28
> 
> QUERY([City];[City]country code=$cntryCode)                           
> QUERY SELECTION([City];[City]longitude>=$lon_r;*)
> QUERY SELECTION([City]; & ;[City]longitude<=$lon_r)
> ….
> 
> $0:=[City]timezone
> 
> It’s not a “live” database so I don't want to spend too much time with it. 
> But when I need to match data then, of course, I want it to search as fast as 
> is possible.
> 

**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to