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: Formatting SQLplus output

Re: Formatting SQLplus output

From: <nasof_at_hotmail.com>
Date: Tue, 21 Jul 1998 16:36:33 GMT
Message-ID: <6p2g2h$p0g$1@nnrp1.dejanews.com>


Sounds like you need to create a PLSQL program to loop through the results set and print to a file exactly what you want. I don't think you'll get a single SQL statement to do this, nor a SQL*PLUS report.

One question: Why in the world does someone want a flat file with pipe- delimited columns that are null when they are not?

-Frank

In article <01bdb4a4$29cd5280$370da482_at_tumeric.natinst.com>,   "Lily Djuniarti" <lily.djuniarti_at_natinst.com> wrote:
> How can I format sql query output so that a certain column is not printed
> repeatedly?
> I used Break On <column name>, but it didn't work when I concatenate my
> column with | (pipe). I need to concatenate the columns because I want to
> dump the output to a flat file, then email the flatfile as attachment.
> I would appreciate any idea on how to do this.
>
> Eg. query:
> Select employee# || '|' || order# || '|' || product# || '|'
> from table1
>
> sample output:
> E1 | Ord1 | Prod1
> E1 | Ord1 | Prod2
> E1 | Ord1 | Prod3
>
> desired output (same order numbers only printed once)
> E1 | Ord1 | Prod1
> E1 | | Prod2
> E1 | | Prod3
>
> Thanks,
>
>

-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum Received on Tue Jul 21 1998 - 11:36:33 CDT

Original text of this message

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