Oracle Single-row subquery returns more than one row error?

Change case when (select t2. MANAGER from Table2 t2 where t2. CPK = t1. CPK) in (Select MANAGER from Table3 where USER_ID=44) then 1 to case when exists (select * from Table3 t3 inner join table2 t2 on t2. Manager = t3. Manager where t3.

USER_ID=44 and t2. CPK = t1. CPK) then 1.

Thanks Golez Trol for your help – paramupk Oct 3 at 5:11.

I got a headache just to understand your table design. Have you heard about joins? SELECT DISTINCT c.

*, CASE WHEN e. Empid IS NOT NULL OR ei. USER_ID IS NOT NULL THEN 1 ELSE 0 END AS Grey_Out FROM Company c LEFT OUTER JOIN EmployeesInfo ei ON c.

MANAGER = ei. MANAGER OR c. LEAD = ei.

LEAD OR c. HR = ei. HR LEFT OUTER JOIN Employees e ON e.

CPK = c. CPK AND ( e. MANAGER = ei.

MANAGER OR e. LEAD = ei. LEAD OR e.HR = ei.

HR ) WHERE c. CPK = '1234' AND ei. USER_ID = 44.

Thanks Scorpi0. But it returned 0 record. By the way we cant change the Table design its up and running and designed by 3rd party vendor.So we can just use as it is.

I have Heard about joins and have used it – paramupk Oct 3 at 5:12.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions