Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Help with a SQL query
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
![]() |
![]() |