Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

statement wrks in sqlplus , wouldn't compile in stored procedure

Status
Not open for further replies.

jphillips

Programmer
Nov 20, 2001
24
US
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top