Re: Export table to comma delimited file?
Date: 1995/09/14
Message-ID: <811082505.11783_at_olmsys.demon.co.uk>#1/1
scthomp_at_ibm.net (Simon Thompson) wrote:
>The problem with this soluktion is that each line has trailing spaces up to
>the linesize. ASCII delimited is often much smaller withour them.
>Uou can use Oracle Browser (unless the number of rows exceeds the Browser
>limit). Or Paradox. Or Excel.
>+---------------------------
>| Simon Thompson
>| Christchurch
>| New Zealand
I've seen a couple of people mention this trailing spaces business. It's not a problem. Getting rid of trailing spaces is easy. All you need to do is to do SET TRIMOUT ON in the SQL statement and then run the SQL from your O/S command line and pipe the output into a file. e.g.
$ sqlplus -s user/pass _at_mysql >mysql.lst
This will remove trailing spaces. Using spool from within your SQL file will NOT work as TRIMOUT has no effect with spool. I suspect this was originally a bug which hung around for so long that it became a feature.
If you use this feature you can use really big linesize settings without your output files turning into The Mother Of All Output Files.
Pete Received on Thu Sep 14 1995 - 00:00:00 CEST