Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
first off thanks for any help
i have 2 tables as described below
Table1
Asset,Lat, Long
Table2
Area, Lat1,Lat2,Long1,Long2
Table1 describes the location of an asset
Table2 descrobes an area
i want table 3 to be
Table3
Asset, Area
my thinking is of some kind of only/match/lookup statement that takes to lat/long for each asset and says return me the area where
Lat > Lat1 and
Lat < Lat2 and
Long > Long1 and
Long < Long2
hopefully that all makes sense,
oh and one more thing, the areas will never overlap
Something like this
Temp:
LOAD * FROM Table1;
Join(Temp)
LOAD * FROM Table2;
Result:
LOAD Asset,Area
FROM Temp
Where Lat > Lat1 and Lat < Lat2 and Long > Long1 and Long < Long2
;
Drop Table Temp;
Thanks for the help, i will give it a try and mark as correct