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

Home -> Community -> Usenet -> c.d.o.server -> Re: Multi Rows String concatenation

Re: Multi Rows String concatenation

From: Antoine BRUNEL <"Antoine>
Date: Sat, 24 May 2003 16:30:21 +0200
Message-ID: <3ecf81fd$0$25955$79c14f64@nan-newsreader-01.noos.net>


try to use ||

select cust_id||cust_name ....
...
group by cust_id||cust_name

will return something like '00001TOTO'

"Catalin Trifu" <catalin_at_isp-software.de> a écrit dans le message de news:d0b5fe87.0305240450.77461fd4_at_posting.google.com...
> Hi,
>
> I want to concatenate the values from a VARCHAR2 type column based
> on a
> GROUP BY clause.
> I know there are no aggregate functions for such a thing, and I was
> wondering how to achieve this.
> Example:
>
> tables CUSTOMERS(id_customer, str_name)
> PRODUCTS(id_product, str_number)
> CONTRACTS(id_contract, str_number)
> CONTRACTS_PRODUCT(id_contract_product, id_contract,
> id_customer, id_product)
>
> I want to get all the contract numbers for the customer, product
> combinations in one SELECT query and so far I was very much
> unsuccessfull.
> Any help would be really appreciated.
>
> Thanks,
> Catalin
Received on Sat May 24 2003 - 09:30:21 CDT

Original text of this message

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