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: Problem with SQL :

Re: Problem with SQL :

From: Jim Kennedy <kennedy-down_with_spammers_at_attbi.com>
Date: Thu, 24 Apr 2003 13:47:13 GMT
Message-ID: <BVRpa.624921$S_4.678943@rwcrnsc53>


You are going to have to write a function that would return the semicolon delimited list for you.
Jim

--
Replace part of the email address: kennedy-down_with_spammers_at_attbi.com
with family.  Remove the negative part, keep the minus sign.  You can figure
it out.
"Paolo" <pablofrompadova_at_yahoo.it> wrote in message
news:a1041494.0304240132.378c2c84_at_posting.google.com...

> I've 2 tables : TABELLA_A , TABELLA_B as below
>
>
> ____________________________
> | FIELDA1 | KEYA | FIELDA2 | TABELLA_A
> |_________|_______|__________|
> | | | |
> | ASTERIX | AX | MZ |
> |---------|-------|----------|
> | OBELIX | AX | SZ |
> |---------|-------|----------|
> | TERLIX | AX | PZ |
> |_________|_______|__________|
>
>
>
>
> _______________________________
> | FIELDB1 | KEYB1 | FIELDB2 | TABELLA_B
> |_________|_______|_____________|
> | | | |
> | ASTERIX | AX | CL |
> |---------|-------|-------------|
> | ASTERIX | AX | PI |
> |---------|-------|-------------|
> | ASTERIX | AX | RE |
> |_________|_______|_____________|
> | | | |
> | OBELIX | AX | CL |
> |_________|_______|_____________|
> | | | |
> | OBELIX | AX | JE |
> |_________|_______|_____________|
> | | | |
> | OBELIX | AX | PI |
> |_________|_______|_____________|
>
>
> If I execute the query :
>
> SELECT FIELDA1,FIELDB2 FROM TABELLA_A,TABELLA_B
> WHERE TABELLA_A.KEYA = 'AX'
> AND TABELLA_A.FIELDA2 = 'MZ'
> AND TABELLA_A.KEYA = TABELLA_B.KEYB1
> AND TABELLA_A.FIELDA1 = TABELLA_B.FIELDB1
>
> I obtain this result:
>
> _____________________
> | FIELDA1 |FIELDB2 |
> |_________|___________|
> | | |
> | ASTERIX | CL |
> |---------|-----------|
> | ASTERIX | PI |
> |---------|-----------|
> | ASTERIX | RE |
> |_________|___________|
>
> but my task is to obtain only one record as below:
>
>
> ________________________________
> | FIELDA1 | FIELDB2 |
> |_________|______________________|
> | | |
> | ASTERIX | CL;PI;RE |
> |_________|______________________|
>
>
> Is is possible with a specific query? Someone can help me?
> Thanks in advance.
Received on Thu Apr 24 2003 - 08:47:13 CDT

Original text of this message

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