Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> DISTINCT clause...
Hi there...
suppose this table:
table A
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....
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
![]() |
![]() |