Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

INLINE


Hi ,

I have a QVD file shown below.

PRODUCT:
LOAD MARKET_NAME,
    
FAMILY_ID,
    
AST_PROMO_FLG,
     PRODUCT_NAME,
    
MARKET_NAME,
FROM

Now here I have informations like

PRODUCT_NAMEFAMILY_ID
AA111
BB222
CC333
DD444
EE555
FF666
GG777

NOW I WANT TO CHANGE THE FAMILY_ID FOR SELECTED PRODUCTS LIKE

EE = 999 & GG = 888.

CAN ANY ONE HELP ME ON THE SAME.

THANKS IN ADVANCE.

REGARDS,

KK

3 Replies
Not applicable
Author

Hi,

You can use a combination of mapping table and applymap.

Example of adjusted script syntax:

MappingTable:

MAPPING

LOAD * INLINE

[

FAMILY_ID, FAMILY_ID_NEW

999, 999_NEW

888, 888_NEW

]

;

And for your QVD use the following load:

PRODUCT:
LOAD MARKET_NAME,
     APPLYMAP('MappingTable',
FAMILY_ID, FAMILY_ID) AS FAMILY_ID,
    
AST_PROMO_FLG,
     PRODUCT_NAME,
    
MARKET_NAME,
FROM

The disadvantage of this solution is that your QVD load is no longer optimized (= fast). Maybe you already have a resident load later in the script in which you can incorporate the function?

Kind regards,

Matthijs

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     You can use the concept of Mapping table.

     You will get the detailed information about this function in Help section of QlikView Desktop.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
ashfaq_haseeb
Champion III
Champion III

Hi,

Try below

Temp:

Load * Inline

[

PRODUCT_NAME,    FAMILY_ID

AA,    111

BB,    222

CC,    333

DD,    444

EE,    555

FF,    666

GG,    777

];

Main:

Load *,if (PRODUCT_NAME='EE',999,if(PRODUCT_NAME='GG',888,FAMILY_ID)) as FAMILY_ID1

resident Temp;

drop Table Temp;

Regards

ASHFAQ