Link to home
Start Free TrialLog in
Avatar of michael4606
michael4606

asked on

Convert PL/SQL to SQL

Hello,

I need to convert a PL/SQL block to standard ANSI SQL (attached).  What can you recommend?


Thanks,

Michael

DECLARE
   CURSOR c IS SELECT count(1) amount, pnd_index_owner OWNER FROM ctxsys.ctx_pending GROUP BY pnd_index_owner;
   pending_rec c%ROWTYPE;
BEGIN
   OPEN c;
   LOOP
      FETCH c INTO pending_rec;
         EXIT WHEN c%NOTFOUND;
         DBMS_OUTPUT.PUT_LINE(rpad(pending_rec.owner, 15,'.') || pending_rec.AMOUNT);
   END LOOP;
END;

Open in new window

ots.txt
ASKER CERTIFIED SOLUTION
Avatar of GGuzdziol
GGuzdziol
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of michael4606
michael4606

ASKER

GGuzdziol,

That is perfect!