Hi guys,
I'm trying to compose a query that will select all columns from a
table, but without any duplicates.
E.g.
table name is 'tblShipment'
columns are:
fldUnique(pk) | fldShipNo | fldDate | fldValue
001 | 123 | 02/02/02 | 2000
002 | 222 | 01/01/01 | 3000
003 | 123 | 03/03/03 | 4000
004 | 444 | 04/04/04 | 5000
I want to be able to select all columns (4 columns) without
duplicates, which should give me a recordset:
fldUnique(pk) | fldShipNo | fldDate | fldValue
001 | 123 | 02/02/02 | 2000
002 | 222 | 01/01/01 | 3000
004 | 444 | 04/04/04 | 5000
** 003 is not selected becoz it's fldShipNo is identical to that of
001.
How should I go about querying that?
I've tried to select it with DISTINCT, but i'm unable to use DISTINCT
to select all columns. It is important that I have all columns
selected, especially the primary key (pk), becoz I need it for
reference.
I'm really having trouble trying to achieve this, so I hope someone
can help me out.
Thanks,
Shawn