ronaldmacdonald
MIS
Hi
I am looking to select distinct records from a table based on the values being distinct in one row.
Consider the table "mydata":
field1 field2 field3 field4
a 1 b y
a 1 b y
b d f x
In this example table field4 has 2 rows with duplicate values (this is the field we wish to carry out the distinct operation on).
The output required would be:
field1 field2 field3 field4
a 1 b y
b d f x
If I do a select distinct(field4) all I get is:
field4
y
x
but I need to see the other colums as well!
I am looking to select distinct records from a table based on the values being distinct in one row.
Consider the table "mydata":
field1 field2 field3 field4
a 1 b y
a 1 b y
b d f x
In this example table field4 has 2 rows with duplicate values (this is the field we wish to carry out the distinct operation on).
The output required would be:
field1 field2 field3 field4
a 1 b y
b d f x
If I do a select distinct(field4) all I get is:
field4
y
x
but I need to see the other colums as well!