sql – Oracle procedure saving SYSDATE
sql – Oracle procedure saving SYSDATE
In PLSQL
you can just assign:
BEGIN
...
l_date_string := [ || TO_CHAR (SYSDATE, MMDDYYYY-HH24:MI:SS) || ];
...
END;
if you insist on sql
all you have to do is to add into
after select
:
BEGIN
...
-- standard select .. from .. with additional into
select [ || TO_CHAR (SYSDATE, MMDDYYYY-HH24:MI:SS) || ]
into l_date_string
from dual;
...
END;
I think this is where your issue might be .
select [||TO_CHAR (SYSDATE, MMDDYYYY-HH24:MI:SS)||] into l_date_string from dual;
notice the change of the into
.