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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: PL/SQL Question

RE: PL/SQL Question

From: Stephane Faroult <sfaroult_at_oriolecorp.com>
Date: Tue, 19 Mar 2002 07:48:32 -0800
Message-ID: <F001.0042D1B0.20020319074832@fatcity.com>

 ('binary' encoding is not supported, stored as-is)

Write a PL/SQL function which takes the licence_id as argument and returns a varchar2(... what you deem sufficient, up to 32K). In the function, loop on the appropriate table and concatenate. When you run

    select licence_id, my_ugly_func(licence_id) softwares     from ...

you more or less get what you want. Performance will even be decent if you have indexed by licence_id.

>----- Original Message -----
>From: iashraf_at_csc.com
>To: Multiple recipients of list ORACLE-L
><ORACLE-L_at_fatcity.com>
>Sent: Tue, 19 Mar 2002 04:28:19
>
>
>Hi all,
>
>i have 2 tables software and licence. 1 licence can
>have many softwares.
>
>softwares
>------------
>name platform Licence_id
>--------------------------------------------
>abc NT 1
>def WIN2K 1
>ghi all 2
>
>i want to write a query that displays the results
>as follows
>
>licence_id softwares
>----------- -----------------------
>1 abc (NT), def(WIN2K)
>2 all
>
>Any suggestions on how i can do this?
>
>cheers!
>
>--
>Please see the official ORACLE-L FAQ:
>http://www.orafaq.com
>--
>Author:
> INET: iashraf_at_csc.com
>
>Fat City Network Services -- (858) 538-5051
>FAX: (858) 538-5051
>San Diego, California -- Public Internet
>access / Mailing Lists
>To REMOVE yourself from this mailing list, send an
>E-Mail message
>to: ListGuru_at_fatcity.com (note EXACT spelling of
>'ListGuru') and in
>the message BODY, include a line containing: UNSUB
>ORACLE-L
>(or the name of mailing list you want to be removed
>from). You may
>also send the HELP command for other information
>(like subscribing).
>---------------------------------------------------
>-----------------

Stephane Faroult
Oriole Corporation
Performance Tools & Free Scripts



http://www.oriole.com, designed by Oracle DBAs for Oracle DBAs
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Stephane Faroul
  INET: sfaroult_at_oriolecorp.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Tue Mar 19 2002 - 09:48:32 CST

Original text of this message

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