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 for query where result depends on result - Help!

SQL for query where result depends on result - Help!

From: Adrian Bowen <adrian_at_raptor.win-uk.net>
Date: Sat, 21 Aug 1999 20:15:17 +0100
Message-ID: <7pmu0f$blb$1@laura.pcug.co.uk>


As an SQL novice, I'm afraid I can't get my head around this - grateful for any help.

I want to do a SELECT to implement a form of override - i.e. return an overriding value if present, else return the default. So the simplified result from my basic query looks like:

TYPE MODE
-------- ----------

3         DEFAULT - want to get rid of this
4         DEFAULT
5         PRIVATE
6         PRIVATE
3         PRIVATE

All I want to do is get rid of the first row, because there is a PRIVATE row with the same TYPE. I'm sure the answer will be blindingly obvious, should I stumble across it. Or should someone helpfully point me in the right direction. At the moment I can't even figure out how to do it on a straight table looking like the above!

Ta,

Adrian Received on Sat Aug 21 1999 - 14:15:17 CDT

Original text of this message

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