selecting rows for only column
From: marianna <marianna6000_at_yahoo.com>
Date: 18 Apr 2002 17:13:44 -0700
Message-ID: <28a354f8.0204181613.1fb1a101_at_posting.google.com>
| CA | CB | CC |
| CA | CB | CC |
Date: 18 Apr 2002 17:13:44 -0700
Message-ID: <28a354f8.0204181613.1fb1a101_at_posting.google.com>
Hi,
I am new to SQL so please be patient. I would like some help with the following problem:
I have been trying to select a series of columns from a table, but
want the
distinct keyword to only apply to one column, ie the first one in the
example below. I would like the first instance of the CA column to
appear from table X only. If I were to do SELECT DISTINCT * FROM X; I
would get the whole lot.
Here is an example table X with columns CA, CB and CC. I wish select a distinct column CA (the first available instance of that column). TABLE X
| CA | CB | CC |
p a x p a y p b x p b y q a x q b y
This is the result I would like to get
| CA | CB | CC |
p a x q a x
I would greatly appreciate any help you can give me.
Thanks,
Marianna Received on Fri Apr 19 2002 - 02:13:44 CEST