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: 
cristianj23a
Partner - Creator III
Partner - Creator III

Apply Map in Select for Where

Hi Guys.

I have a doubt about the applymap,

There is a way to apply applymap in the Select.

I currently have 2 tables.

One that has a registration date and another does not. I want to enter the registration date to table 2, through the key field BELNR but in Select and do a Where in table two, so that the data is added daily.

TABLE1:

SELECT

CPUDT

BELNR,  // DocumentNo   //******************************LLAVE*****************************************//

GJAHR,  // Fiscal Yr

VERSN,  // Version

FROM COBK WHERE VRGNG='COIN' AND CPUDT>'$(vFecMaxCOBK)';

TABLE2:

SELECT BUZEI,  // Post. row

KOKRS,  // CO Area

BELNR,  // DocumentNo    //******************************LLAVE****************************************//

PERIO,  // Period

GJAHR,  // Fiscal Yr

PRODPER // Prod.Month

FROM COEP WHERE KOKRS='1000' AND WRTTP='04' AND VERSN='000' AND LEDNR='00';

Greetings.

https://www.linkedin.com/in/cristianjorge/
Do not forget to mark as "Accepted Solution" the comment that resolves the doubt.
2 Replies
passionate
Specialist
Specialist

Please post sample data and explain a bit more.

because i done see registration date in any of these two tables

sasiparupudi1
Master III
Master III

no you can not use applymap in a select statement.

You will have to use a resident load of table2..

Map_CPUDATE:

Mapping Load

CPUDT,

BELNR

Resident TABLE1;

TABLE2_New:

Noconcatenate load

BUZEI,  // Post. row

KOKRS,  // CO Area

BELNR,  // DocumentNo    //******************************LLAVE****************************************//

PERIO,  // Period

GJAHR,  // Fiscal Yr

PRODPER ,

APPLYMAP('Map_CPUDATE',BELNR,'NA') AS NewDate

Resident TABLE2

WHERE APPLYMAP('Map_CPUDATE',BELNR,'NA')>'$(today())'

;

Drop table TABLE2;