Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
brunolelli87
Creator II
Creator II

Inserting values from one table into another

Hello guys,

I have one table with the following fileds:

KEYDEPARR
001ASVCPGIG
035SDMAOBEL
037SDRECPOA

 

And another table with the following fields:

APTLATLONG
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:

KEYDEPARRLAT DEPLON DEPLAT ARRLON ARR
001ASVCPGIG-27.24-47.78-14.35-15.78
035SDMAOBEL-23.88-20.25-22.14-33.66
037SDRECPOA-22.15-15.33-24.53-22.25

 

Thank you guys,

Labels (1)
1 Solution

Accepted Solutions
Saravanan_Desingh
MVP
MVP

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
];

View solution in original post

2 Replies
Saravanan_Desingh
MVP
MVP

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
];
Saravanan_Desingh
MVP
MVP

Output:

commQV58.PNG