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: Help with a sql statement...

Re: Help with a sql statement...

From: <jdarrah_co_at_my-deja.com>
Date: Thu, 07 Dec 2000 15:53:19 GMT
Message-ID: <90obpb$hqj$1@nnrp1.deja.com>

Are there a standard number of site names that can be applied across all site ids? If this were the case, you could create a view with a bunch of decode statements. This would not give you exactly what you want becaues there would still be many rows per id and the host language would need to populate the variables correctly. otherwise, you'll need to use pl/sql or some other procedual language to stitch together a string and return it.

In article <mgav2tge39m196aguoaji1tu4kksrignl3_at_4ax.com>,   Harry <a_harrison_uk_at_yahoo.co.uk> wrote:
> I have 2 tables -
>
> SITES

 SITE_NAMES
> ---------



> SITE_ID SITE_ID
> SITE_VALUE SITE_NAME
> SITE_COST
>
> A site can have many names - I need to return a recordset set that
 includes in a single site record
> all "SITE_NAME"'s concatenated in to a single field i.e
 called "SITE_NAMES" that match on the
> "SITE_ID" field
>
> I know it's some sort of nested SELECT statement but I can't seem to
 get it to work as I want to
>
> Any ideas?
>
> thanks
>
> Harry
>

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Thu Dec 07 2000 - 09:53:19 CST

Original text of this message

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