Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Concatenation bug

Hello experts!

I have loaded files from different qvd files.

e.g.

LEFT JOIN(Moves)
LOAD ID_WAREH,
WAREH_CODE,
WAREH_NAME
FROM $(master)\Wareh.qvd(qvd);

LEFT JOIN(Moves)

  LOAD ID_ITEM,
ITEM_CODE, !
ITEM_DESCR,
ITEM_FIRMCODE

FROM $(master)\Item.qvd(qvd);

 

But I want to concatenate the WAREH_CODE FROM $(master)\Wareh.qvd(qvd);

With ITEM_FIRMCODE FROM $(master)\Item.qvd(qvd);

Like this

WAREH_CODE & ‘-‘ & ITEM_FIRMCODE as Concat

Beacause I have the above excel file and I want to 'Applymap'

LOAD*,
ApplyMap(ccGR_Mapping,Concat) as ccGR

 

    gwassenaararthur.dommarcowedelashkan_no9vikasmahajanrahulpawarb

vishwaranjanmurali99mdmukramaliQlikView Forums & ResourcesNew to QlikView

@Anonymous Help???

1 Solution

Accepted Solutions
ramasaisaksoft

if u want to work with Apply map()

Mandatory rules are

1) Mapping Table should be loaded before the table in which ApplyMap need to be used

2) Mapping Table should be having exactly two columns.

  • //Mapping table 
  • Table1: 
  • Mapping LOAD 
  • Concat, 
  • ccGR 
  • FROM 
  • MappingData.xlsx 
  • (ooxml, embedded labels, table is Sheet1); 

  • Moves: 
  • //Preceding Load statement to include ApplyMap in the result 
  • LOAD *, 
  • //ApplyMap('<Mapping_Table>', Map_Column, Default_Value) as ColumnName 
  • ApplyMap('Table1', WAREH_CODE & ‘-‘ & ITEM_FIRMCODE) as ccGR; 
  • //Load Moves data 
  • LOAD 
  • ID_WAREH, 
  • ID_ITEM, 
  • .... 
  • .... 
  • FROM $(master)\Moves.qvd(qvd); 
  • //Left Join with Moves table 
  • LEFT JOIN(Moves) 
  • LOAD ID_WAREH, 
  • WAREH_CODE, 
  • WAREH_NAME 
  • FROM $(master)\Wareh.qvd(qvd); 
  • //Left Join with Moves table 
  • LEFT JOIN(Moves) 
  • LOAD ID_ITEM, 
  • ITEM_CODE, 
  • ITEM_DESCR, 
  • ITEM_FIRMCODE 
  • FROM $(master)\Item.qvd(qvd); 

if u feel u got the solution for ur issue,please close the thread by clicking "Correct Answer"

View solution in original post

3 Replies
rahulpawarb
Specialist III
Specialist III

Hello Kyparisia,

Trust that you are doing great!

As per my understanding I have drafted below sample script:

//Mapping table

Table1:

Mapping LOAD

Concat,

ccGR

FROM

MappingData.xlsx

(ooxml, embedded labels, table is Sheet1);

Moves:

//Load Moves data

LOAD

ID_WAREH,

ID_ITEM,

....

....

FROM $(master)\Moves.qvd(qvd);

//Left Join with Moves table

LEFT JOIN(Moves)

LOAD ID_WAREH,

WAREH_CODE,

WAREH_NAME

FROM $(master)\Wareh.qvd(qvd);

//Left Join with Moves table

LEFT JOIN(Moves)

LOAD ID_ITEM,

ITEM_CODE,

ITEM_DESCR,

ITEM_FIRMCODE

FROM $(master)\Item.qvd(qvd);

MovesFinal:

LOAD *,

//ApplyMap('<Mapping_Table>', Map_Column[, Default_Value]) as ColumnName

ApplyMap('Table1', WAREH_CODE & ‘-‘ & ITEM_FIRMCODE) as ccGR

Resident Moves;

Drop Table Moves;

In this, I have created Table1 as mapping table; which will be later consumed using ApplyMap function.

Please let me know if you still have further queries.

Regards!

Rahul

ramasaisaksoft

if u want to work with Apply map()

Mandatory rules are

1) Mapping Table should be loaded before the table in which ApplyMap need to be used

2) Mapping Table should be having exactly two columns.

  • //Mapping table 
  • Table1: 
  • Mapping LOAD 
  • Concat, 
  • ccGR 
  • FROM 
  • MappingData.xlsx 
  • (ooxml, embedded labels, table is Sheet1); 

  • Moves: 
  • //Preceding Load statement to include ApplyMap in the result 
  • LOAD *, 
  • //ApplyMap('<Mapping_Table>', Map_Column, Default_Value) as ColumnName 
  • ApplyMap('Table1', WAREH_CODE & ‘-‘ & ITEM_FIRMCODE) as ccGR; 
  • //Load Moves data 
  • LOAD 
  • ID_WAREH, 
  • ID_ITEM, 
  • .... 
  • .... 
  • FROM $(master)\Moves.qvd(qvd); 
  • //Left Join with Moves table 
  • LEFT JOIN(Moves) 
  • LOAD ID_WAREH, 
  • WAREH_CODE, 
  • WAREH_NAME 
  • FROM $(master)\Wareh.qvd(qvd); 
  • //Left Join with Moves table 
  • LEFT JOIN(Moves) 
  • LOAD ID_ITEM, 
  • ITEM_CODE, 
  • ITEM_DESCR, 
  • ITEM_FIRMCODE 
  • FROM $(master)\Item.qvd(qvd); 

if u feel u got the solution for ur issue,please close the thread by clicking "Correct Answer"

Anonymous
Not applicable
Author

Thank you very much for your time and the correct answer!!!

But i cant mark both so i marked the first one by the time it was send!

Thanks again

I am grateful!!!