| SQL - Questions and Answers Have a SQL question? Post it here. First do a search to see if someone hasn't already answered it. |
|
|||
error returned for a query containg caseTHIS IS MY TABLE
EMPNO JOB MANAGER ========= =============== ============== 101 ENGINEER ASAD 102 ACCOUNTANT ARJUN 103 OFFICEBOY KIRAN 111 DRIVER VARUN 104 LIFT OPERATOR CHRISTY since the table is not clear here i will explain the table contains an empno column of integer type,job column of varchar type and a manager column of varchar type with the shown values THIS WAS MY QUERY select case when((select count(empno) from employee where manager='asad')=1)then 'more than one employee' else(select empno from employee where manager='arjun') end from employee where manager='arjun' AND THE FOLLOWING WAS THE ERROR SHOWN FOR THE ABOVE QUERYConversion failed when converting the varchar value 'more than one employee' to data type int. THANKS IN ADVANCE ........ FOR HELP Last edited by arun : 07-22-2008 at 01:29 PM. |
|
Be the first to answer this question! Click on the 'Post Reply' button below.
|