When I run this code in SQLplus it works perfect.
select distinct agent_name,
(select count(agent_name) from agent_table where kudo_QA = 'KUDO' and agent_name = b.agent_name) Kudo,
(select count(agent_name) from agent_table where kudo_QA = 'QA' and agent_name = b.agent_name) QA from KUDO b;
When I through it into a stored procedure and build it in a cursor, it will not compile and errors out with the error stating about the extra select statements (which I don't understand) any ideas
select distinct agent_name,
(select count(agent_name) from agent_table where kudo_QA = 'KUDO' and agent_name = b.agent_name) Kudo,
(select count(agent_name) from agent_table where kudo_QA = 'QA' and agent_name = b.agent_name) QA from KUDO b;
When I through it into a stored procedure and build it in a cursor, it will not compile and errors out with the error stating about the extra select statements (which I don't understand) any ideas