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 -> DISTINCT clause...

DISTINCT clause...

From: Joao Ricardo B Oliveira <jricardo_at_ipb.pt>
Date: Thu, 1 Jul 1999 15:24:43 +0100
Message-ID: <7lfu44$lq4$1@pan.ipb.pt>


Hi there...

suppose this table:

table A



id
year
course
disciplin
opc1
opc2

id year course discipl opc1 opc2 ---- ----- ------- ------ ----- ----

883    1998    118        1001    5        6        *
883    1998    118        1002    5        6
883    1998    118        1004    8        3
883    1999    118        2001    5        4        *
883    1998    118        2002    6        4
....
884 ....

Select Distinct id,year,course, first(discipl), first(opc1), first(opc2) from table_a;

i want that with a select distinct instruction get this data 883 1998 118 5 6
883 1999 118 5 4

Take a look that what i want is select the DISTINCT (id,year,course) PLUS the first columns (discipl, opc1, opc2) like when in MS ACCESS we do SQL instructions like : (...) FIRST(discipl), FIRST (opc1), FIRST (opc2) Received on Thu Jul 01 1999 - 09:24:43 CDT

Original text of this message

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