Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I loaded two columns of data from a qvd file into table_1: employee, hours_worked. There are many hours_worked rows for each employee.
I'm trying to create a [Results] table that sums all hours_worked for each employee (one row per employee).
[Results]:
NoConcatenate
load
[Employee] as Emp
, sum([hours_worked]) as Total_HRS
Resident [table_1]
;
I'm getting an 'invalid expression' error. Note: the script does work if I only inlclude the sum([hours_worked]) line, but of course, I only get one row in Results table showing the total hours_worked by all employees.
HI @yankeybeans ,
You have yo add Group By to your statement as below:
[Results]:
NoConcatenate
load
[Employee] as Emp
, sum([hours_worked]) as Total_HRS
Resident [table_1] Group by [Employee];
Best Regards
HI @yankeybeans ,
You have yo add Group By to your statement as below:
[Results]:
NoConcatenate
load
[Employee] as Emp
, sum([hours_worked]) as Total_HRS
Resident [table_1] Group by [Employee];
Best Regards
Agigliotti,
Thanks so much.
Yankeybeans