I want to add prefix in my result.
I tried below SQL code to get my result.
Select * FROM human_resources hr left JOIN account_group ac ON ac.NAME = hr.user_name AND ac.adgroup = hr.name left join controll_aduser qa on right(hr.user_name, length(hr.user_name) - 7) = UPPER(qa.user_name) left join employee e on qa.employee_code = e.employee_code
I am not getting any error related to above SQL query but the problem is in table human_resources user_name is mention for eg:
DI-SHA\QALAM and I want to add
DI-SHA\ in Table control_aduser field because in that table user_name is mentioned as 'qalam' in small letters.