Basically I would like to pass a date value to a cursor, and print out the entire row/record after for each found. I am having trouble because a) I don't know if my date is being converted properly in the BEGIN section, and b) I am getting "wrong number or types of arguments in call to 'PUT_LINE'" when printing each row.
This is what I have so far:
DEFINE B_HIREDATE = 11-OCT-88
DECLARE
cursor DATE_CUR (the_date DATE) is
select * from employees
where hire_date > to_date(the_date, 'dd-mon-yy')
order by hire_date;
r_emp DATE_CUR%ROWTYPE;
BEGIN
for r_emp IN DATE_CUR('&B_HIREDATE') LOOP
dbms_output.put_line(r_emp);
end LOOP;
END;
/
I am getting no output values, even if I change my select statement to a known single field name.