Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Question for an SQL expert
Could some SQL expert answer the following question?
I have a table that contains the following columns:
PRDGRP_ID
ZONE_ID
SRP
Sample data:
1,1,1.99 1,2,1.89 1,3,1.79 2,1,2.99 3,1,6.99 3,3,7.05
I am trying to write a SQL query that will return the SRP for a givin zone_id. Example if I request zone_id "1", I want the following to be returned:
1,1,1.99 2,1,2.99 3,1,6.99
1,2,1.89 2,1,2.99 (since there isn't a zone_id of "2", return the default) 3,1,6.99 (since there isn't a zone_id of "2", return the default)
Could someone help me with this query?
Thanks,
Jeff Milton
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Thu May 25 2000 - 00:00:00 CDT