Re: SQL*PLUS simple quesion

From: Michel Cadot <micadot_at_netcourrier.com>
Date: Thu, 7 Dec 2000 15:35:20 +0100
Message-ID: <90o79p$up6$1_at_s1.read.news.oleane.net>


Henning Eli Lang <hlang_at_mail.htc.dk> a écrit dans le message : 3A2F9924.9429E76C_at_mail.htc.dk...
>
>
> Michel Cadot wrote:
> >
> > Answer embedded.
> >
> > --
> > Have a nice day
> > Michel
> >
> > Henning Eli Lang <hlang_at_mail.htc.dk> a écrit dans le message : 3A2E11DB.DAE9E2DB_at_mail.htc.dk...
> > > What we want to do is the following:
> > >
> > > We want our select statement to return the output in csv format i.e :
> > >
> > > field1,field2,field3
> > >
> > > The select statement we've tried was select field1 || ',' || field2 || ',' ||
> > > field3, which works out ok except for one thing.
> > >
> > > The header returned was "field1||','||field2||',' etc..
> > >
> > > How do we make the heading look correkt i.e. field1,field2,field3
> >
> > select field1 || ',' || field2 || ',' || field3 as "field1,field2,field3"
> > from ...
>
> Thanks very much for the solution, which leaves me with only one small problem:
>
> When I use the solution the .. as "......" apparently is limited to 30
> characters. Is there a way to overcome this limit ?
>

You can use the column statement:

v734> column d format a50 heading "abcdefghijklmnopqrstuvwxyz0123456789" v734> select dummy as d from dual;

abcdefghijklmnopqrstuvwxyz0123456789



X

1 row selected.

> >
> > >
> > > another question: Is there a method to avoid the "N rows selected" , which is
> > > very annoying if you want to automatically process the output.
> >
> > set feedback off
> >
> > >
> > >
> > > --
> > > Venlig hilsen
> > >
> > > Henning Lang - Systemadministrator
> > >
> > > Erhvervsskolen Hamlet
> > > IT afdelingen
> > > Milnersvej 48
> > > 3400 Hillerød
> > >
> > > tlf: 48 29 01 23 / 24 86 99 04
> > > hlang_at_mail.htc.dk
>
> --
> Venlig hilsen
>
> Henning Lang - Systemadministrator
>
> Erhvervsskolen Hamlet
> IT afdelingen
> Milnersvej 48
> 3400 Hillerød
>
> tlf: 48 29 01 23 / 24 86 99 04
> hlang_at_mail.htc.dk

--
Regards
Michel
Received on Thu Dec 07 2000 - 15:35:20 CET

Original text of this message