Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi friends,
I have a below table in that some of the columns emp_id is blank. so my req is if sales id is present and emp id is blank in that case need to display new column as status yes else No.
| sales_id | sales_name | sales | emp_id | emp_name |
| 1 | aaa | 10 | zz | |
| 2 | bbb | 20 | xx | |
| 3 | ccc | 30 | 123 | yy |
| 4 | ddd | 40 | 456 | tt |
| 5 | eee | 50 | 789 | vv |
Thanks,
Thanks for reply nag,
i got solution simply i applied if condition
if(IsNull(EMP_ID) and not IsNull(SLS_TTY_ID),'y','n')as new
this condition is working.
Hi Kumar,
Load *,
If(Len(Trim(emp_id))=0, 'Yes','No') as Status;
LOAD * INLINE [
sales_id, sales_name, sales, emp_id, emp_name
1, aaa, 10, , zz
2, bbb, 20, , xx
3, ccc, 30, 123, yy
4, ddd, 40, 456, tt
5, eee, 50, 789, vv
];
Thanks for reply nag,
i got solution simply i applied if condition
if(IsNull(EMP_ID) and not IsNull(SLS_TTY_ID),'y','n')as new
this condition is working.
You can try this too
If(emp_id= '', 'Yes','No') as Status
OR
If(Trim(emp_id)= '', 'Yes','No') as Status
I assume that sales_id field cannot be null and thus suggested the above solution.
Anyways, you go the solution. Have a nice day.