How do i select distinct from an access database??

I am trying to use a query from VB to an access database and select the distinct records. I find it impossible to believe that access does not have a distinct function but apparently it does not.

does anyone know how I can get a query like this to work? "select distinct(id) from tablename"

any help is appreaciated.

Lee

Comments

  • : I am trying to use a query from VB to an access database and select the distinct records. I find it impossible to believe that access does not have a distinct function but apparently it does not.
    :
    : does anyone know how I can get a query like this to work? "select distinct(id) from tablename"
    :
    : any help is appreaciated.
    :
    : Lee
    :
    :

    You should be able to use the following... Select Distinct ID from tablename; No parens. I don't know what version of access you are using. If you are not sure of the syntax (and mine doesn't work) just open the query editor in Access and double click in the empty space above the QBE grid, but not on a table. This will bring up properties for the query and one of the options is distinct. After setting this, look at the syntax in the SQL view for the query.

    -Ray
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion