Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Update existing field

Hi, I have a customer table and for some records I want to update the value with that from a second table:

Table1

cust-code     active     name

A001            Y           Joe

A002            N           Pete

A003            Y           Bill

A004            Y           Mary

A005            Y           Lucy

Table2

cust-code     active

A001            N

A005            N

I want to finish with:

Table3

cust-code     active     name

A001            N           Joe

A002            N           Pete

A003            Y           Bill

A004            Y           Mary

A005            N           Lucy

Thanks for any help you can offer

1 Solution

Accepted Solutions
sunny_talwar

May be try this with Mapping Load

MappingTable:

Mapping

LOAD * INLINE [

    cust-code,    active

    A001,            N

    A005,            N

];

Table:

LOAD [cust-code],

  ApplyMap('MappingTable', [cust-code], active) as active,

  name;

LOAD * INLINE [

    cust-code,    active,    name

    A001,            Y,          Joe

    A002,            N,          Pete

    A003,            Y,          Bill

    A004,            Y,          Mary

    A005,            Y,          Lucy

];

View solution in original post

2 Replies
Anil_Babu_Samineni

Where your Database stored??

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
sunny_talwar

May be try this with Mapping Load

MappingTable:

Mapping

LOAD * INLINE [

    cust-code,    active

    A001,            N

    A005,            N

];

Table:

LOAD [cust-code],

  ApplyMap('MappingTable', [cust-code], active) as active,

  name;

LOAD * INLINE [

    cust-code,    active,    name

    A001,            Y,          Joe

    A002,            N,          Pete

    A003,            Y,          Bill

    A004,            Y,          Mary

    A005,            Y,          Lucy

];