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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Mapping Select

Hi

I have 2 tables and I want to use one as a mapping table.

When I run the script below I get a table containing the TblJob with Null values in the added field, and following, rows of the added field with Null in all the other fields.To simplfy this - if one table had 100 rows and the second had 50 rows, now I have 150 rows in the new table.

Thanks

anat

TblOrderJobs_Map:



MAPPING SELECT JobID as ID,

OrderLineNum







FROM LiadData.dbo.TblOrderJobs;



LOAD

ActiveTimeMin,











ID as JobID





applymap

('TblOrderJobs_Map',ID,0) as OrderLineNum;





SQL SELECT ActiveTimeMin,

ID





FROM LiadData.dbo.TblJob;



3 Replies
Not applicable
Author

Hi anat,

is your problem still newsworthy. I tried to rebuild your script with two oracle-tables of my own. It worked as expected.

Here is my script:

TblOrderJobs_Map:
Mapping
LOAD JOBID AS ID,
ORDERLINE;
SQL SELECT *
FROM "DWH_LOKAL".MAPJOBS;


TblJob:
LOAD ACTIVETIMEMIN,
ID,
applymap ('TblOrderJobs_Map',ID,0) as OrderLineNum;

SQL SELECT ACTIVETIMEMIN,
ID
FROM "DWH_LOKAL".JOB;

Are you sure, your scource-data is as you expect it ?

Regards

Not applicable
Author

Hi

well I still dont know what Im doing wrong.. I have tried it with different tables, and its not working - I get a NULL value.

I guess Im missing something..

Finally I just used LEFT JOIN since my tables are not big.

Thanks!

Not applicable
Author

Not sure whether this is the real problem, but you do miss a ',' (comma) between

ID as JobID

and

applymap(...