ExecuteSQL()
{
sql_query=""
sql_query=$1
if [ "$sql_query" != "" ]
then
sqlplus -s $dbuser/$dbpass << END_OF_SQL
set pages 0;
set linesize 285;
set long 999999999;
set head off;
spool $logdir/$fileName;
select dbms_xmlgen.getxml( '$sql_query' )xmlrow from dual;
spool off;
/
END_OF_SQL
fi
}
sql="select * from table where to_date(moddate,'DD-MON-YY') in to_date('12-FEB-08','DD-MON-YY')"
ExecuteSQL sql 1 > $logdir/temp.xml 2 > $logdir/error.log
Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.
”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics.