Hi I am running the following SQL script in sqlPlus
ACCEPT g_TXN_Date date format 'dd/mm/yyyy' PROMPT 'Enter Start Date (leave blank FOR today): ' default sysdate
select TO_CHAR(TO_DATE('&g_TXN_Date'), 'DD/MM/YYYY') from dual
/
The idea is the user can only specify a date but if they don't specify anything then the current date is selected.
I get errors
Enter value for g_txn_date:
old 1: select TO_CHAR(TO_DATE(&g_TXN_Date), 'DD/MM/YYYY') from dual
new 1: select TO_CHAR(TO_DATE(), 'DD/MM/YYYY') from dual
select TO_CHAR(TO_DATE(), 'DD/MM/YYYY') from dual
*
ERROR at line 1:
ORA-00938: not enough arguments for function
Any help would be great !