Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I have a table that contains employee number and employee name, in some cases the table has 2 records
Eg
Employee no EmployeeName
20000005 JOE BLOGS
20000005 joe blogs
I need to return just 1 record
May be try using FirstValue or LastValue function in the script:
LOAD EmpNO,
FirstValue(EmpName) as EmpName
Resident YourTable
Group By EmpNo;
May be try using FirstValue or LastValue function in the script:
LOAD EmpNO,
FirstValue(EmpName) as EmpName
Resident YourTable
Group By EmpNo;
Hi,
Then what do you want to do with 2 emplyoee Name
Try concat()
try like
Load EmployeeNo,
Concat(EmployeeName) as CombineEmployeeName
From TableName;
Kind Regards
Try like this if you have more fields in table add remaining field in group by
Data:
load Empno
Firstvalue(Empname) as Empname
Group by Empno;
load Empno,
Capitalize(Trim(Empname)) as Empname
From Table;
Which one of those two records is 'correct'?
As per you data sample , due to the case miss match its showing as two different records try to convert then to common format using Capitalize() or Upper () function will do that
LOAD [Employee no],
Capitalize([EmployeeName]) as EmployeeName,
//Upper(EmployeeName) as EmployeeName
Good to question to ask