Hi All,
I have the table as below:
create table emp_temp (employee_number varchar2(100),ename varchar2(100));
insert into emp_temp values (1,'ramesh');
insert into emp_temp values (2,'John');
insert into emp_temp values (3,'Peter');
The below sql query
select employee_number,'Found' from emp_temp
where employee_number in (1,2,3,4,5,6,7);
will return output as below
EMPLOYEE_NUMBER FOUND
================== ========
1 Found
2 Found
3 Found
But Expected output is as below:
| EMPLOYEE_NUMBER | FOUND/NOT FOUND |
| 1 | Found |
| 2 | Found |
| 3 | Found |
| 4 | Not Found |
| 5 | Not Found |
6 7 | Not Found Not Found |
Basically, I want to build the SQL query to display all the values in the "IN" operator and say found or not found.
Thanks,
Ramesh Selvam.