Click to See Complete Forum and Search --> : show only unique fields


gerjan
07-01-2003, 03:32 AM
Hello,

I have an Access DB with fields that contains the same name.
Now I only have wan't to display the unique fields from the table.

i.e TABLE =

hardware
hardware
hardware
windows
windows
office

Suposed to display:

hardware
windows
ofice

Is there a code I can put in my SQL string or something to realise this?

Ribeyed
07-01-2003, 04:26 AM
Hi,
you use DISTINCT in your select statement:


sqlstr = "SELECT DISTINCT(tblName.FldName), tblName.FldName2 FROM tblName WHERE tblName.FldName = "&whatever&""

hope this helps

gerjan
07-01-2003, 04:28 AM
That was easy :)

Tnx

Ribeyed
07-01-2003, 04:48 AM
lol, yes it was, but you just need shown the once, but no problem:)