Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a working load statement (Department), and want to add another from the same table so presumed id put it below - this hasnt worked though, what am i doing wrong? see below:
LOAD *,
If(Department =1, 'Blue Team',
If(Department =2, 'CNC Team',
If(Department =3, 'Green Team',
If(Department =4, 'Office Team',
If(Department =45, 'Admin Team',
If(Department =5, 'Red Team',
If(Department =6, 'White Team',
If(Department =7, 'Yellow Team',
If(Department =9, 'Aqua Team'))))))))) AS Team;
LOAD *,
If(WorkPattern =FC01, '39',
If(WorkPattern =FC02, '32',
If(WorkPattern =FC03, '39',
If(WorkPattern =FC04, '16',
If(WorkPattern =FC05, '19',
If(WorkPattern =FC06, '23',
If(WorkPattern =OF01, '39',
If(WorkPattern =OF02, '32',
If(WorkPattern =OF03, '24'))))))))) AS Hours;
Employees:
LOAD EmployeeNumber,
Department,
WorkPattern;
SQL SELECT EmployeeNumber,
Department,
WorkPattern
FROM EquatorCompanyA.dbo.TimBEEmployeeDetails;
Your condition
WorkPattern =FC01
should probably be quoted:
WorkPattern ='FC01'
HIC
Your condition
WorkPattern =FC01
should probably be quoted:
WorkPattern ='FC01'
HIC
Thanks Hic, that worked! i dont understand why the first load didnt require quote marks then?
I recommend you to use ApplyMaps() instead.
Because it's numeric.