Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Save $600 on Qlik Connect registration! Sign up by Dec. 6 to get an extra $100 off with code CYBERSAVE: REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
vishalgoud
Creator III
Creator III

how to get the rest of the employees details...??

Hi All.

i have permanent employee details in table A and all contract employee details in table B.. and swipe in information for both of these and also visitors details are available in another table C..

Emp ID is the common key for all the tables. now how to get the 3rd category people like visitors.

Any pointers on How we can achieve this, Thanks in advance.

6 Replies
Gysbert_Wassenaar

Concatenate all the records from tables A,B and C into one table and add a field that indicates what kind of record it is, e.g. 'permanent', 'contract', 'visitor'


talk is cheap, supply exceeds demand
vishalgoud
Creator III
Creator III
Author

thanks Much for the reply,

table A with permanent employee details.

table B with Contract employee details.

table C with all employee details along with visitors details.

So i want to substrct both table A and B from Table C so that will get the visitors information...is there any way to do that...??

i want the counts from table C which are not in table A and B...

Where not exists work for my above seanario !!

balabhaskarqlik

May be:

Either Permanent / Contract Employee, they'll have one type of Employee Code. For Visitors it'll be allocated differently.

So compare based on EmployeeID, where it's null for Visitors. In Table A, Add a Flag to indicate Permanent, In Table B, Add a Flag to indicate Contract, in Table C create a condition to check permanent or contract, so the remaining people falls in Visitors category.

jyothish8807
Master II
Master II

Hi Vishal,

Try like this:

A:

Load

Name

from permanent;

concatenate

B:

Load

Name

from Contract ;


Join (A)

C:

Load

Name,

Name as NewName

from Allemp_visitor;

Noconcatenate:

😧

Load

Name,

if(Name=NewName,1,0) as Flag

resident A;

Drop table A;

Visitor:

Load

Name as VisitorName

resident D

where Flag=0;

Br,

KC

Best Regards,
KC
jyothish8807
Master II
Master II

You can replace name with your empID field.

Best Regards,
KC
jyothish8807
Master II
Master II

One other way:

A:

Load

Empid

from permanent;

concatenate

B:

Load

Empid

from Contract ;


Noconcatenate

C:

Load

count(Empid) as Countvisitors,

from Allemp_visitor

where not exists (Empid,Empid);

Br,

KC

Best Regards,
KC