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 -> SQL puzzler with lookup table

SQL puzzler with lookup table

From: <jimbo1155_at_my-deja.com>
Date: Thu, 02 Nov 2000 16:48:51 GMT
Message-ID: <8ts5tg$b08$1@nnrp1.deja.com>

Here's something that has me stumped.
I'm getting a value from a lookup table.

Say this table has a key comprised of city and state and has another column, otherInfo, dependent on the key. Now, I need entries for all city and state combinations. But let's say that for state = 'DE', otherInfo is always the same value, so I don't care what city it is.

My task is to keep the lookup table as small as possible. So I would like to have just one row for 'DE', and some value I can use for city, and a simple SQL query that will return just one row.

Any ideas?

City           State        otherInfo
Albany         NY           x
Buffalo        NY           y

.
.

N/A DE z

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Thu Nov 02 2000 - 10:48:51 CST

Original text of this message

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