You don't need a pl/sql for that. Your query in itself is fine. But you can also select other columns apart from the customer name.
eg.
SELECT cust_name, other columns u want
FROM Customers C, Orders O
WHERE C.cust_id = O.cust_id
AND trunc(O.order_date) = '&days'




Reply With Quote