Dear Friends,
Please help me to achieve the following:
I want to pass one parameter from Shell-script to Sql-script.
Example:
My ShellScript.sh is calling report.sql like this:
/bin/sqlplus /reports.sql
And
My report.sql is calling many Stored-Procedures like this:
exec SP_REPORT_1( TO_DATE('20070921', 'YYYYMMDD') );
exec SP_REPORT_2( TO_DATE('20070921', 'YYYYMMDD') );
exec SP_REPORT_2( TO_DATE('20070921', 'YYYYMMDD') );
So I want to passs this date ('20070921') from ShellScript.sh to report.sql, somthing like this:
/bin/sqlplus /reports.sql '20070921'
Please tell me how can I achieving this, I am very poor in Shell and SQL scripting.
Many Thanks,
Subodh Bansal