Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Help regarding query
This is a multi-part message in MIME format.
------=_NextPart_000_01C0_01BFC71F.C18F97B0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit
This message is scanned for Viruses
------=_NextPart_000_01C0_01BFC71F.C18F97B0 Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi Gurus,
Can some one tell me how to do this?
Name Status ---- ------ A LI A DE A EX B DE B EX C LI C EX
In the above table, there can be only one record per Name where the =
status will be LI.
The query result should be like this:
Result:
Name Status ---- ------ A LI B ZZ C LI
i.e. If there is at least one occurence of LI status, then the name = should have LI as status. If there is no LI at all, then also the Name = should appear, but with a Status ZZ.
Can somebody help in this regard soon? Thanks a lot.......... Atish.
------=_NextPart_000_01C0_01BFC71F.C18F97B0 Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2014.210" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi Gurus,</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>Can some one tell me how to do =
this?</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3D"Courier New" size=3D2>Name =20
Status</FONT></DIV>
<DIV><FONT face=3D"Courier New" size=3D2>---- =20
------</FONT></DIV>
<DIV><FONT face=3D"Courier New"=20
size=3D2>A =
LI</FONT></DIV>
<DIV><FONT face=3D"Courier New"=20
size=3D2>A =
DE</FONT></DIV>
<DIV><FONT face=3D"Courier New"=20
size=3D2>A EX</FONT>=
</DIV>
<DIV><FONT face=3D"Courier New"=20
size=3D2>B =
DE</FONT></DIV>
<DIV><FONT face=3D"Courier New"=20
size=3D2>B =
EX</FONT></DIV>
<DIV><FONT face=3D"Courier New"=20
size=3D2>C =
LI</FONT></DIV>
<DIV><FONT face=3D"Courier New"=20
size=3D2>C =
EX</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3D"Courier New" size=3D2>In the above table, there can =
be only one=20
record per Name where the status will be LI.</FONT></DIV>
<DIV><FONT face=3D"Courier New" size=3D2>The query result should be like =
this:</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3D"Courier New" size=3D2>Result:</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3D"Courier New" size=3D2>Name =20
Status</FONT></DIV>
<DIV><FONT face=3D"Courier New" size=3D2>---- =20
------</FONT></DIV>
<DIV><FONT face=3D"Courier New"=20
size=3D2>A LI</FONT></DIV>=
<DIV><FONT face=3D"Courier New" =
size=3D2>B =20
ZZ</FONT></DIV>
<DIV><FONT face=3D"Courier New" =
size=3D2>C =20
LI</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3D"Courier New" size=3D2>i.e. If there is at least one =
occurence of=20
LI status, then the name should have LI as status. If there is no LI at =
all,=20
then also the Name should appear, but with a Status ZZ.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3D"Courier New" size=3D2>Can somebody help in this =
Received on Fri May 26 2000 - 04:06:19 CDT
![]() |
![]() |