Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
LOAD
ActiveTimeMin,ID as JobID
applymap
('TblOrderJobs_Map',ID,0) as OrderLineNum;
SQL SELECT ActiveTimeMin,
ID
FROM LiadData.dbo.TblJob;
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
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 sure whether this is the real problem, but you do miss a ',' (comma) between
ID as JobID
applymap(...