PDA

Click to See Complete Forum and Search --> : SQL - select UNIQUE


turfbult
Sep 11th, 2000, 02:39 PM
Hi,

I have an access db with a table hotels and want to fill a combo box with all the UNIQUE states in that table.

The table has many hotels in the same state!!

I tried ..

ssql = "select unique (states) as states from hotels"

but I get the error "undefined function 'unique' in expresion"

Can someone please tell me how this is done!!

Thank you.

JHausmann
Sep 11th, 2000, 05:19 PM
Try "distinct" in place of "unique".

turfbult
Sep 12th, 2000, 12:43 AM
Thanks you,

"distinct" works!!!