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: 
Anonymous
Not applicable

Left outer join table in load statement

Hello,

What syntax I should use to get :

EmplHist table

Left outer join with this EESprvsr table.

After both both already load in qvw.

Tab: EEHIstory

//***********************
EmplHist:
LOAD EMPL_ID,
  FULL_NAME,
  Status,
  HOME_ORG_ID,
  TITLE_DESC,
  GLC,
  DATE(max([EMP_END_DATE])) as [END_DATE]
 
RESIDENT TempEmployeeHist
WHERE EXISTS (DirectOrg, HOME_ORG_ID) and EMP_END_DATE='12/31/2078'

GROUP BY EMPL_ID, FULL_NAME, Status, HOME_ORG_ID, TITLE_DESC, GLC;

DROP TABLE TempEmployeeHist;

Tab: Sprvsr

//******************

Sprvsr:
LOAD  EMPL_GROUP_DESC as [SprvsrName],
    EMPL_GROUP_CD as [SprvsrID];

SQL SELECT *
FROM [DELTEKTE].[TC_0012].[EMPL_GROUP]
WHERE LEFT([EMPL_GROUP_CD], 1) ='M'
;
LEFT JOIN (Sprvsr)
LOAD  EMPL_ID as [TE_Employee_ID],
    EMPL_GROUP_CD  as [SprvsrID];

SQL SELECT *
FROM [DELTEKTE].[TC_0012].[EMPL_GROUP_EMPL]
;

3 Replies
jvitantonio
Specialist III
Specialist III

Do it like this

Table1:

Load Resident

EmplHist

;

Table2:

Left Join (Table1)

Load * resident EESprvsr ;

Not applicable
Author

I think this answer is correct

maxgro
MVP
MVP

left join from a resident table, and rename the field te..emp..id to join

left join (EmplHist)

load

     [SprvsrName],

     [SprvsrID],

     [TE_Employee_ID] as EMPL_ID

resident

     Sprvsr;


then I think you have to drop Sprvsr




another way could be to change from

LOAD  EMPL_ID as [TE_Employee_ID],

to

LOAD  EMPL_ID as EMPL_ID,

and you shoul get 2 tables with an association by   EMPL_ID

there is no need to add a left join in this way