Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all.
I have two data sets, each with a list of users.
The first data file is loaded in, and has like 100 users.
The second is loaded in, and has 50 users.
If a user is on both sets, I want to create a new field called UserType and call those users 'B'. If they are only on the original list, then 'A'.
Any ideas?
I've done some research and am thinking to use the exists() command but am not sure how to implement this fully.
Thanks
Check this?
Sample taken from QV Help Reference.
Employees:
LOAD * inline [
Employee|ID|Salary
Bill|001|20000
John|002|30000
Steve|003|35000
] (delimiter is '|');
Citizens:
Load * inline [
Name|Address
Bill|New York
Mary|London
Steve|Chicago
Lucy|Paris
John|Miami
] (delimiter is '|');
EmployeeAddresses:
Load Name as Employee, Address,
IF(Exists(Employee, Name), 'B', 'A') AS GroupType
Resident Citizens;
Drop Tables Employees, Citizens;
Check this?
Sample taken from QV Help Reference.
Employees:
LOAD * inline [
Employee|ID|Salary
Bill|001|20000
John|002|30000
Steve|003|35000
] (delimiter is '|');
Citizens:
Load * inline [
Name|Address
Bill|New York
Mary|London
Steve|Chicago
Lucy|Paris
John|Miami
] (delimiter is '|');
EmployeeAddresses:
Load Name as Employee, Address,
IF(Exists(Employee, Name), 'B', 'A') AS GroupType
Resident Citizens;
Drop Tables Employees, Citizens;
Thanks!