view SQL*Plus generated *.csv on iPhone (iOS) with default app. Howto modify *.csv? [message #565399] |
Tue, 04 September 2012 04:26 |
|
oranooob
Messages: 88 Registered: May 2009
|
Member |
|
|
Hi
Howto generate with SQL*Plus a *.csv that can be viewed with iPhone (iOS)? Don't wish to install additional app. Should be viewable in default app.
At the moment there is character garbage in iPhone, but on Windows with Excel the file opens fine.
generate_csv ()
{
sqlplus -S $USER/$PASSWD@$ORACLE_SID <<EOF > /opt/oracle/reports/service_report_.$(/bin/date '+%d%m%Y.%Hh')
set echo Off
set term On
set pages 0
set head off
set ver off
set feed off
set trims on
set linesize 20000
SELECT serial
|| ';'
|| upd_time
|| ';'
|| MESSAGE
|| ';'
|| entity_table
|| ';'
|| action
|| ';'
|| rss_name
|| ';'
|| rss_type
|| ';'
|| admin
|| ';'
|| ess_user
|| ';'
|| origin
|| ';'
|| rss_user_name
|| ';'
|| ug_name
|| ';'
|| original_command
FROM trans
[...]
exit
EOF
}
|
|
|
|
|
|
|
|
|