Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have data as below
Employee:
load * Inline [
Employee, Address, EmployeeCode
z,xxe,7
A , XXX, 1
B , YYY, 2
C ,ZZZ, 3
D, QBC, 100
E, LAD, 200
M,WWW,5
];
table:
Load
Employee,
Address,
EmployeeCode,
IF(MATCH(Employee, 'A','B','C','D','E','M'),PEEK(EmployeeCode,0),EmployeeCode) as Val2
Resident Employee;
drop table Employee;
if i add any record in the first line of inline it should not reflect to the column Val2
for example if i add one record says y in the first line of inline still it should shows employee code as 7 in val2 field how can i write expression for this.
please help me on this
thanks,
himabindu ch
What about the expected output for A, B, C, D, E, M employee? Why are they getting Val2 from the row above?
Hi Sunny,
i want employee code of A, B, C, D, E, M is as employee code of Z.
and in above Val2 column is representing the same but if i changed the order then PEEK function will take the order accordingly.i don't want that to happen it should be constant if i changed the order.
Try this
IF(MATCH(Employee, 'A','B','C','D','E','M'),Lookup('EmployeeCode','Employee','z','Employee'),EmployeeCode) as Val2
Regards,
Antonio