Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello guys,
I have one table with the following fileds:
KEY | DEP | ARR |
001AS | VCP | GIG |
035SD | MAO | BEL |
037SD | REC | POA |
And another table with the following fields:
APT | LAT | LONG |
VCP | -27.24 | -47.78 |
MAO | -23.88 | -20.25 |
REC | -22.15 | -15.33 |
BEL | -22.14 | -33.66 |
GIG | -14.35 | -15.78 |
POA | -24.53 | -22.25 |
How can I get the values of LAT and LONG of each airport and update the first table including LAT and LONG for DEP and ARR, creating something like:
KEY | DEP | ARR | LAT DEP | LON DEP | LAT ARR | LON ARR |
001AS | VCP | GIG | -27.24 | -47.78 | -14.35 | -15.78 |
035SD | MAO | BEL | -23.88 | -20.25 | -22.14 | -33.66 |
037SD | REC | POA | -22.15 | -15.33 | -24.53 | -22.25 |
Thank you guys,
One solution,
tab1:
LOAD * INLINE [
KEY, DEP, ARR
001AS, VCP, GIG
035SD, MAO, BEL
037SD, REC, POA
];
Left Join(tab1)
LOAD APT As DEP, LAT As [LAT DEP], LONG As [LONG DEP];
LOAD * INLINE [
APT, LAT, LONG
VCP, -27.24, -47.78
MAO, -23.88, -20.25
REC, -22.15, -15.33
BEL, -22.14, -33.66
GIG, -14.35, -15.78
POA, -24.53, -22.25
];
Left Join(tab1)
LOAD APT As ARR, LAT As [LAT ARR], LONG As [LONG ARR];
LOAD * INLINE [
APT, LAT, LONG
VCP, -27.24, -47.78
MAO, -23.88, -20.25
REC, -22.15, -15.33
BEL, -22.14, -33.66
GIG, -14.35, -15.78
POA, -24.53, -22.25
];
One solution,
tab1:
LOAD * INLINE [
KEY, DEP, ARR
001AS, VCP, GIG
035SD, MAO, BEL
037SD, REC, POA
];
Left Join(tab1)
LOAD APT As DEP, LAT As [LAT DEP], LONG As [LONG DEP];
LOAD * INLINE [
APT, LAT, LONG
VCP, -27.24, -47.78
MAO, -23.88, -20.25
REC, -22.15, -15.33
BEL, -22.14, -33.66
GIG, -14.35, -15.78
POA, -24.53, -22.25
];
Left Join(tab1)
LOAD APT As ARR, LAT As [LAT ARR], LONG As [LONG ARR];
LOAD * INLINE [
APT, LAT, LONG
VCP, -27.24, -47.78
MAO, -23.88, -20.25
REC, -22.15, -15.33
BEL, -22.14, -33.66
GIG, -14.35, -15.78
POA, -24.53, -22.25
];
Output: