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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

swapping the sales records from one code to other

Hi experts,

i have the following qvds.

In the Branch table, i have to swap the BRCODE like this.

Old    New

10      12

08      14

31       01

Only the BRCODE has to be swapped not the BRNAME.

When i do this, i have to get all other details like Answered, Amount, etc (from the respective tables) under the new BRCODE.

Branch:

LOAD BRCODE,

     BRNAME

   

FROM

QVD\K8_BRANCH.qvd

(qvd);

Calls:

LOAD BRCODE,

     DECDDT,

     BRNAME,

     Answered

    

FROM

QVD\OLD_DATA.qvd

(qvd);

concatenate

LOAD DECDDT,

     BRNAME,

     Lookup('BRCODE','BRNAME', BRNAME,'Calls') as BRCODE,

      Answered

   

FROM

QVD\CallDetails.qvd

(qvd)

Sales:

LOAD  DECDDT,

            Amount,

            Type,

            BRCODE

FROM

QVD\Sales.qvd

(qvd);

How can i do this.... pls guide me....

its uregentttttttttttt plssssssssss.

17 Replies
Not applicable
Author

the codes are already there in

Branch:

LOAD BRCODE,

     BRNAME

 

FROM

QVD\K8_BRANCH.qvd

(qvd);

this has 200 BRCODE

in that i have to swap that three alone

from    to

10      12

08      14

31       01

the BRNAME is same for old and new BRCODES

Not applicable
Author

OK

so

Map_Code:

load * inline [

old, new

10      12

08      14

31       01

];

in every table having BRCODE use

LOAD

applymap('Map_Code', BRCODE, BRCODE)     as BRCODE   // new will replace old, or if not new will remain the same

...

best regards

Chris

sgrice
Partner - Creator II
Partner - Creator II

Map_Code:

load * inline [

old, new

10      12

08      14

31       01

];

or use

map BRCODE using Map_Code;

this will change any value in any field BRCODE using this map.

Not applicable
Author

Chris,

If i do the mapping, the code alone got changed.

but the records from old BRCODE are not brought to the new one.

pls help

Not applicable
Author

No.

If i do the mapping, the code alone got changed.

but the records from old BRCODE are not brought to the new one.

Any other suggestions plsssssssssssss

sasiparupudi1
Master III
Master III

Did you apply the map to all the tables where BRCODE is used?

Not applicable
Author

So, complete the load with a join to fecth data according to new code.

I can't write the code for you  because i don't kknow how your data are stored.

Need to know relation between fields

can you provide a qvw ?

Chris

Not applicable
Author

yes i did for all tables