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: SQL Report

Re: SQL Report

From: Joel Garry <joel-garry_at_home.com>
Date: 6 May 2003 14:19:08 -0700
Message-ID: <91884734.0305061319.45f04ee0@posting.google.com>


Karsten Farrell <kfarrell_at_belgariad.com> wrote in message news:<MPG.19217f67491f83d898976e_at_news.la.sbcglobal.net>...
> nospam_at_spam.com said...
> > Hi..All,
> >
> > I have 2 tables employee (employeeid), dept (dept_id, ,employeeid).
> > I want to get a report in the following format
> >
> > <dept_id1>
> > employeeid1
> > employeeid2
> > ...
> > ...
> >
> > <dept_id2>
> > employeeidXX
> > employeeidYY
> > ....
> > ...
> > ..
> >
> >
> > Is this possible to do it in a single SQL.
> >
> > Regards,
> >
> > P
> Kinda hard to do in a single SQL; relatively simple in PL/SQL. In
> sqlplus, type this:

I seem to recall concatenating ascii cr or lf or something, it wasn't so hard.
But on the other hand, I've worked in so many similar-yet-different languages I sometimes get confused.

select 'x'|| chr(10)||'y'||chr(10)||'z' from dual a, dual b
where a.dummy = b.dummy;

If I have to make a particular data format (as opposed to a report format), I usually just massage it in [gn]awk anyways.

jg

--
@home.com is bogus.
http://www.signonsandiego.com/news/uniontrib/tue/business/news_1b6briefs.html
Received on Tue May 06 2003 - 16:19:08 CDT

Original text of this message

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