or download this
connstr='user/password@DB';
$account='sqlplus -s $connstr <<END
...
select date_time_out,order_id,error_message,customer_id from <table_na
+me)> where to_char(end_date_time,"yyyymmdd") between '0' and '888888
+88' and error_code<>0;
END
';