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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Self Join Load Error ?

QUALIFY*;

Emp:LOAD ID,

    Employee,

    [Designation ID],

    Superior Id

FROM

(biff, embedded labels, table is Employee$);

Mgr:

LOAD Emp.ID As Mgr_ID,

Emp.Employee As [MgrName]

Resident Emp;

//UNQUALIFY*;

Temp:

Load Emp.EMPLOYEE_ID as Emp_Id, Emp.FIRST_NAME as Emp_name,Mgr.Emp.EMPLOYEE_ID as Mgr_Id,Mgr.Emp.FIRST_NAME as Mgr_Name

Resident Emp

Where Emp.MANAGER_ID = Mgr.Emp.EMPLOYEE_ID

Order by Emp.EMPLOYEE_ID;

DROP Table Emp;

The SQL Query for the Following is

Select e.Emp_ID,e.Employee, Mgr.Emp_ID, Mgr.Employee

from Emp e, Emp mgr

Where e.Emp_ID = Mgr.Emp_ID;

I have A table Employee, I Created another table using Resident Load I need to get Manager name using that I m unable to Execute Above script? Suggest  Any Correction for the Script?

3 Replies
Anil_Babu_Samineni

You want to implement that sql into Qlikview, you mean to say this

Qualify *;

e:

Load Emp_ID, Employee from <Data Source>

Qualify *;

Mgr:

Load Emp_ID,Employee from <Data Source>

Final:

Left Join(e)

Load * Resident e

Left Join(Mgr)

Load * Resident Mgr Where e.Emp_ID = Mgr.Emp_ID;


Drop Table Tables e, Mgr;

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Not applicable
Author

Thank You for taking time.

I worked out as per your script I m getting the Error Please Suggest.

Emp Load.PNGError.PNG

Anil_Babu_Samineni

Can you send real data with the scramble data. So, Please send your application to work

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful