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

Re: DISTINCT clause...

From: Mark G <mgumbs_at_nospam.hotmail.com>
Date: Thu, 1 Jul 1999 16:38:45 +0100
Message-ID: <377b895d.0@145.227.194.253>


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

should work

M

Joao Ricardo B Oliveira wrote in message <7lfu44$lq4$1_at_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 - 10:38:45 CDT

Original text of this message

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