Ernesto_Paez
MIS
Hi everyone,
i have table named empname and a field character named employee.
the employee field values can be as "125, "25", "5150" and so on, it will never has more than 4 characters long.
so i need if the values of that field is len=2, then replace that with a 10 example if "25", then i need it to "1025".
if value ='161',then i need it to be '0161'
if value ="5150", then i need it as "5150"
so here is my select sql ,can you please advise how to get if fixed as i it is working for <3 bit not working for the others, so i can't figure out
thanks a lot in advance
i have table named empname and a field character named employee.
the employee field values can be as "125, "25", "5150" and so on, it will never has more than 4 characters long.
so i need if the values of that field is len=2, then replace that with a 10 example if "25", then i need it to "1025".
if value ='161',then i need it to be '0161'
if value ="5150", then i need it as "5150"
so here is my select sql ,can you please advise how to get if fixed as i it is working for <3 bit not working for the others, so i can't figure out
Code:
Select Iif(len(alltrim(employee))< 3, '10','0')+alltrim(employee) as employee;
FROM y:\empname into Cursor junksalary NOFILTER