Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Folks,
How can we do self join in expression of straight table.
Data is
EmpName,ID_Emp,ID_Sup,Sales
ABC,1,2,21
XYZ,2,3,32
ZDC,3,4,4
LMN,4,5,33
I Need straight table with
SupID SupName EmpID
2 XYZ 1
3 ZDC 2
4 LMN 3
You do not need any join, just reload with NoConcatenate the fields you need
TableA:
Load EmpName,ID_Emp,ID_Sup,Sales Resident ...
TableB:Noconcatenate
Load
ID_Sup as SupID, EmpName as SupName, Id_Emp as EmpID resident TableA;
drop table TableA;
I can't reload, I will have to write something in expression of table.
So write a table with the fields you need, if you need a chart then add an expression with 1 as value then hide the column
Could you please share a qvw with example, as I have already tried adding in table.
Any help would be really appreciated.
This looks like a hierarchy to me, where ID_Emp is the NodeID and ID_Sup is the ParentID. If so, you should look at the Hierarchy prefix.
See more on Unbalanced, n-level hierarchies
In any case, you cannot make a join in a straight table. You need to do it in the script.
HIC