Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> beginner question
how can I output (to the screen) the result from a cursor..
I am stuck! everywhere online they show how you can do operations on the cursor result, but what about just output that result????
here is my code:
DECLARE
day3 DATE := '&day1';
day4 DATE := '&day2';
first_name VARCHAR(10);
last_name VARCHAR(10);
perform_value FLOAT;
CURSOR T1Cursor IS
SELECT E.FIRST, E.LAST,
SUM(SI.QUANTITY_SOLD)/SUM(WS.START_TIME.diff(WS.END_TIME)) AS PERFORMANCE
FROM DEPT D, EMP E, RECEIPT R, SOLD_ITEMS SI, WORKED_SCHEDULE WS WHERE D.NAME = 'Cashier' AND D.DEPTNUMBER = E.DEPTNUMBER AND R.CASHIERSSN=E.SSN AND R.SALEDATE >= day3 AND R.SALEDATE <= day4 AND R.RECEIPTNUMBER = SI.RECEIPTNUMBER AND WS.WSSN=E.SSN AND WS.DAY >= day3 AND WS.DAY <= day4GROUP BY E.FIRST, E.LAST;
-- Quotes from The Weather Man: Robert Spritz: Do you know that the harder thing to do, and the right thing to do, are usually the same thing? "Easy" doesn't enter into grown-up life... to get anything of value, you have to sacrifice.Received on Tue Apr 04 2006 - 23:02:12 CDT