I have written a batchfile below which should execute the sql query. Can someone please help me in modifying the below code. I know we can make use of sql file ,but wanted it to be more robust and hence everything in a single batch file instead of having combination of sqlfile and batchfile.
sqlplus sys/XXX as sysdba
@echo SET SERVEROUTPUT ON;
@echo v1 DATE;
@echo SELECT SYSDATE INTO V1 FROM DUAL;