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 -> The proof of my efforts!

The proof of my efforts!

From: amwi <amwi_at_yahoo.com>
Date: Mon, 05 Jul 2004 19:11:17 GMT
Message-ID: <pJhGc.97941$dP1.325643@newsc.telia.net>


Ok then.
PLEASE try to understand that i have NEVER used the SQL plus tool and I am pretty new to PL/SQL too.
I have now tried my best and it is obviously not enough. Here is what i have done so far:


set ECHO OFF
set VERIFY OFF
set PAGESIZE 30
set LINESIZE 70
set HEADING OFF
clear columns

column lt format A10
column theTitle format A40

define user_id = 2

select '----------------------------------------------------------' from
dual;
select '&theName' || ' har hyrt ' || trim('&theLendingCount') || 'st film(er).' from dual;

select l.lending_timepoint as lt, m.title as theTitle from lending l
inner join item i on l.item_id = i.id
inner join movie m on m.id = i.movie_id
where l.person_id = &user_id;


 The problem is that the output looks like this:



RAPPORT

RAPPORT
Peter Andersson har hyrt 6st film(er).

RAPPORT

2004-03-06 Sagan om Ringen - Härskarringen
2004-03-16 Rädda Menige Ryan
2004-04-01 Insider, the
2004-04-07 Insider, the
2004-05-12 Matrix, The
2004-05-15 Heat

6 rows selected.


The title repeats itself and i don't know what to do! Is there any way i can make the report look something like this:



Report

xx rented yy movies.

movie 1
movie 2
...
zz rows.



Where xx is a name, yy is the nymber of movies and zz is number of rows. Received on Mon Jul 05 2004 - 14:11:17 CDT

Original text of this message

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