Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Forget it , it is only a test
In article <3663E977.C5D220D9_at_Feist.Com>,
KeyStrk_at_Feist.Com wrote:
> No one does. Oracle doesn't provide a way to turn those pesky extra spaces
off. (Part of
> the Unix mentality, I guess.)
>
> Two things you can do to mitigate the consequences, though. 1) put an extra
tab at the
> end. That way all the extra spaces goes into one final column which can be
deleted once
> you import it into MS Excel. 2) Find yourself a C programmer that is always
bragging that
> C is the only way to go, ask him to 'prove it' by coding a little C program
that will
> strip all the extra spaces off the end of a line. If he is any good, it
should only take
> him a day or two to code and test it and deliver it to you. (The one I goaded
into this
> did it in half a day.) Then in your Unix scripts, always have the file
post-processed by
> that little C program. I would include the C code here, but it was
developed using my
> employers resources, and I need to be faithful to my employer.
>
> By the way, when the C programmer then brags that we need to do away with
Oracle and use C
> and flat files to do everything, that is when you can spring the news on him
that Oracle
> was coded in C.
>
> Fabian Bakker wrote:
>
> > Hi,
> >
> > I want to export data to a ascii, tab delimited file. The linesize is
> > set to 2000, because the final select statement will have lots more
> > columns.
> >
> > Now I use the following sql script:
> > SET LINESIZE 2000;
> > SPOOL C:\OUTPUT.TXT;
> > SELECT
> >
RTRIM(OWNER||CHR(9)||TABLE_NAME||CHR(9)||TABLESPACE_NAME||CHR(9)||RTRIM(CLUSTER_
NAME))
> >
> > FROM SYS.ALL_TABLES;
> > SPOOL OFF;
> >
> > The problem with this script is that their are numerous spaces at the
> > back of each line, Those trailing spaces must be trimmed. I don't know
> > how to do that.
> >
> > Thanx in advance,
>
>
-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Wed Dec 02 1998 - 00:00:00 CST