Can you please help me answer or direct me to resources in answering the following.
I'm attempting to pass a timestamp variable to a block but am getting errors with every method I've tried yet.
The example below is attempting to generate a list of all sales dates for orders after the 21st of March 2000.
DECLARE
BeginDate Orders.PurchaseDate%TYPE :=to_date('21-3-2000', 'dd-mm-yyyy');
Target Orders.PurchaseDate%TYPE;
BEGIN
DBMS_OUTPUT.PUT_LINE(to_char(BeginDate));
SELECT Distinct PurchaseDate
from Orders
into Target
WHERE PurchaseDate>BeginDate;
END;
When running it - it returns
ORA-00933: SQL command not properly ended ORA-06512: at line 8
Please advise