Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> sql query

sql query

From: Reiro <ReiroGP_at_gmail.com>
Date: 22 Aug 2006 03:12:33 -0700
Message-ID: <1156241553.123238.113910@i3g2000cwc.googlegroups.com>


hi ppl...

i hav a table with MANY columns...
A SAMPLE TABLE FOR MY QUERY WILL LOOK AS FOLL......

         NAME                     LEVEL                  ID

         Jim                          P                           1
         Jim                          V                           2
         Peter                        P                           3
         Peter                        S                           4
         Peter                        E                           5
         Peter                        V                           6


many records in the table follow this sequence with some having to levels and some having four levels.

how can i write a query to display all with level 'E' (which is simple) but also include the level 'P'. however i only want to display records where the level 'P' has level V(refer to JIM)

so if i was to query this sample table .... my output would be as follows...

         NAME                     LEVEL                  ID

           Jim                          P                           1
           Peter                        E                           5


thx in advance :) Received on Tue Aug 22 2006 - 05:12:33 CDT

Original text of this message

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