Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Lookup

I have table A which is having column ID , Name,SupervisorID

ID Name  SupervisorID

1    A          3

2    B         

3    C         2

4    D         2

I want to show ID , Name, Supervisor Name , without using hierarchy load .

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

How about something like this ?

Temp:

LOAD * INLINE [

    ID, Name, SupervisorID

    1, A, 3

    2, B

    3, C, 2

    4, D, 2

];

SuperMap:

Mapping

load

  ID as SupervisorID,

  Name as SupervisorName

resident Temp

;

Data:

NoConcatenate

load

  ID,

  Name,

  SupervisorID,

  applymap('SuperMap',SupervisorID, null() ) as Supervisor

resident Temp

;

drop table Temp ;

View solution in original post

3 Replies
ali_hijazi
Partner - Master II
Partner - Master II

what do you mean by hierarchy load

I can walk on water when it freezes
Anonymous
Not applicable
Author

How about something like this ?

Temp:

LOAD * INLINE [

    ID, Name, SupervisorID

    1, A, 3

    2, B

    3, C, 2

    4, D, 2

];

SuperMap:

Mapping

load

  ID as SupervisorID,

  Name as SupervisorName

resident Temp

;

Data:

NoConcatenate

load

  ID,

  Name,

  SupervisorID,

  applymap('SuperMap',SupervisorID, null() ) as Supervisor

resident Temp

;

drop table Temp ;

nagaiank
Specialist III
Specialist III

You may use HIERARCHY load using ID as NodeID, SupervisorID as ParentID.

Qlikview 'Help' gives the details of Hierarchy prefix.