Try this,
my code is
DECLARE
get_date varchar2(30) := '&given_date';
CURSOR c1 IS
SELECT * FROM customer c
WHERE c.cust_no IN
( SELECT j.cust_no FROM job j WHERE
to_char(Pickup_date,'dd-mon-yy') = to_char(to_date(get_date), ,'dd-mon-yy');
client_record c1%ROWTYPE;
BEGIN
OPEN c1;
LOOP
FETCH c1
INTO client_record;
Exit when c1%NOTFOUND;
dbms_output.put_line (client_record.cust_firstname);
END LOOP;
CLOSE c1;
END;
If it still does not work, post the error here.
Sujit
|