Hi JD
I was able to try it again today.
Alessandro was pointing me in the right direction last week and he got me a hint ....

That's what I did for sql oracle to get the right output .... Date in Oracle > 30.06.00 00:00:00.000000000
while read line
do
SQLCMDFIL="${var1}/${SQLDB}_${prjload}_cmdliste.sql"
SQLOUT="${var1}/${SQLDB}_${prjload}_outliste_${app}"
SQLUNLD="${var1}/${SQLDB}_${prjload}_unlo_${app}"
#
# SELECT 'table_1' AS table_name, COUNT(*) FROM table_1 UNION
cat ${SQLHEAD} >${SQLCMDFIL}
echo -e "spool ${SQLOUT}" >> ${SQLCMDFIL}
echo -e "select '#',Form,'#'
,to_char( Date, 'DD.MM.YYYY' ),'#',LB1,'#',LB2,'#',LB3,'#' from "${SQLDB}"."${line}" where code = 99 ;" >>${SQLCMDFIL}
echo -e "spool off" >>${SQLCMDFIL}
echo -e "exit;" >>${SQLCMDFIL}
sqlplus -s ${Psqluser}/${Psqluserpwd} @${SQLCMDFIL}
cat ${SQLOUT}.lst >> ${var2}/${AGI}_${AGIA}_report
done < ${var1}/table.txt
and the result is
# FORM1 # 30.06.2000 # 8576 # 777 # 00000000 # ..... all on the same line
have a nice day
Dani