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

How to override value in two existing table

hiii.. i have two fields product_id and p_value.. loaded file.. its an static and having 500 records.

but i have to join the data of these two fields fom other loaded file in scrpt

eg: in first loaded file i have

product_id  p_value

1                    100

2                    200

3                    300

4                    400

in 2nd table i have same field

product_id  p_value

3                    330

4                    440

5                    500

6                    600    

when i put join between these two table then it show repeated value and new value of particular data

like

product_id  p_value

1                    100

2                    200

3                    300

3                    330

4                    400

4                    440

5                    500

6                    600    

but i want to override the previous value not repeat again that value... i try it alot but can't success..

help me throughout of this

thanx in advance

1 Solution

Accepted Solutions
Not applicable

5 Replies
Anonymous
Not applicable

You could do two loads into the same table, first time for new data, second time for any old data where new data is not available:

TheTable:

LOAD

    product_id,

    p_value

FROM OldSource;

CONCATENATE (TheTable)

LOAD

    product_id,

    p_value

FROM NewSource

WHERE NOT EXISTS (product_id);

Hope this help,

Jonathan

er_mohit
Master II
Master II
Author

thanku very much.. but i want to override the values of same product_id..

nirav_bhimani
Partner - Specialist
Partner - Specialist

HI,

You can take the2nd table first and then do concate with First with same syntax so that u will get all the updated value from it.

Regards,

Nirav Bhimani

er_mohit
Master II
Master II
Author

thanks alot.. yeah its working well....

Not applicable

hi

try it