Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Running SQLPlus from command line

Re: Running SQLPlus from command line

From: RLN <rlntemp-newsgroup_at_yahoo.com>
Date: 23 Oct 2006 15:02:09 -0700
Message-ID: <1161640929.654223.207160@h48g2000cwc.googlegroups.com>


The COLSEP worked very nicely, thanks.

I'm looking through the "download-west" link you have here, looking for a way to reference the length and data type of the columns I need to show from SQL.
For example, if 12 columns were extracted from 4 tables via SQL, it would help my export process (and documentation of the system I am writing) to know the initial lengths of the columns I extract and their datatypes.

Once again, thanks for your assistance. You have made my Oracle learning curve a little smoother.

Thomas Kellerer wrote:
> On 18.10.2006 23:31 RLN wrote:
> > Using SQLPlus from the command line is there a specific command I can
> > include in my .SQL file that would place a comma in between each column
> > value?
>
> SET COLSEP
>
> http://download-west.oracle.com/docs/cd/B10501_01/server.920/a90842/ch13.htm#1012319
>
> > What about writing "fillers" to the text output that is spooled? Can
> > this be done? For example: a "PartNumber" column is 8 digits long.
> > If a particular row has nulls or spaces in the PartNumber column, is
> > there a way to write eight zeros to simply indicate for that row, no
> > part number existed?
>
> What about
>
> SELECT nvl(trim(partnumber), '00000000') FROM theTable;
>
> Thomas
>
>
> --
> It's not a RootKit - it's a Sony
Received on Mon Oct 23 2006 - 17:02:09 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US