Question: I have two columns which I want to combine and show the data, I tried like below

```
select 
    case 
       when status = 'R' 
          then 'Resign'
       when status = 'A' 
          then 'Active' 
    end as status1, 
    Program_name + ' ' + emp_card_no as program_details,
    * 
from 
    GetEmployeeDetails
where 
    emp_name = 'ABHAY ASHOK MANE'
    and STATUS = 'A' 
order by
    EMP_NAME

```

but I am getting an error:

> 
> Error converting data type varchar to numeric.
> 
> 
> 

Here is the sample data available

[![img](https://i.stack.imgur.com/k9Ks0.png)](https://i.stack.imgur.com/k9Ks0.png)

Answer: 
Try this :

```
select 
  case when status='R' then 'Resign'
       when status='A' then 'Active' 
  end as status1, 
  Program_name + ' (' + convert(varchar, emp_card_no) + ') ' as program_details,
* 
from GetEmployeeDetails
Where emp_name ='ABHAY ASHOK MANE'and STATUS= 'A' ORDER BY EMP_NAME

```
If you need parentheses, use following:

```
select 
  case when status='R' then 'Resign'
       when status='A' then 'Active' 
  end as status1, 
  Program_name + ' (' + convert(varchar(10), emp_card_no)+')' as program_details,
* 
from GetEmployeeDetails
Where emp_name ='ABHAY ASHOK MANE'and STATUS= 'A' ORDER BY EMP_NAME

```