Here is what i am doing:
select case
when SUBSTRING(task_ name, 1, 3)= 'PTO'
then Replace(task_na me,'PTO','PTO_H oliday')
when SUBSTRING(task_ name, 1, 7)= 'Holiday'
then Replace(task_na me,'Holiday','P TO_Holiday')
when SUBSTRING(proj_ name, 1, 9)= '9900-2831'
then Replace(proj_na me,'9900-2831','II Internal')
when SUBSTRING(proj_ name, 1, 9)= '9900-2788'
then Replace(proj_na me,'9900-2788','II Internal')
Line 3 ELSE proj_name,task_ name END as Task_Name
FROM dbo._Employee_T ime_Detail_Repo rts INNER JOIN
dbo._vw_Employe e ON dbo._Employee_T ime_Detail_Repo rts.res_name = dbo._vw_Employe e.Employee
This work fine, however in line THREE i need to show two columns
something like this
ELSE proj_name,task_ name END as Task_Name,Proje ct_Name
but this is worng. how can i fix that
select case
when SUBSTRING(task_ name, 1, 3)= 'PTO'
then Replace(task_na me,'PTO','PTO_H oliday')
when SUBSTRING(task_ name, 1, 7)= 'Holiday'
then Replace(task_na me,'Holiday','P TO_Holiday')
when SUBSTRING(proj_ name, 1, 9)= '9900-2831'
then Replace(proj_na me,'9900-2831','II Internal')
when SUBSTRING(proj_ name, 1, 9)= '9900-2788'
then Replace(proj_na me,'9900-2788','II Internal')
Line 3 ELSE proj_name,task_ name END as Task_Name
FROM dbo._Employee_T ime_Detail_Repo rts INNER JOIN
dbo._vw_Employe e ON dbo._Employee_T ime_Detail_Repo rts.res_name = dbo._vw_Employe e.Employee
This work fine, however in line THREE i need to show two columns
something like this
ELSE proj_name,task_ name END as Task_Name,Proje ct_Name
but this is worng. how can i fix that
Comment