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

Home -> Community -> Usenet -> c.d.o.tools -> Help with a SQL query

Help with a SQL query

From: reddy <kspr_at_my-deja.com>
Date: 2000/06/11
Message-ID: <8i14n4$2t4$1@nnrp1.deja.com>#1/1

Hi,

I have a table called PolicyStmts and it has two columns called productTypeCode and Description. There could be multiple "Description"s for a particular productTypeCode. I would like to write a SINGLE query and get descriptions for a given set of product type codes and limit the number of descriptions for a particular productTypeCode to 10.

I wrote the following SQL:
 select productTypeCode, Description
 from PolicyStmts
 where productTypeCode in (x,y,z)

The above query returns all the descriptions for x,y and z. But I would like to have at most 10 descriptions for a give productTypeCode.

Please help me out.

Thanks in advance
Reddy

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Sun Jun 11 2000 - 00:00:00 CDT

Original text of this message

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