Results 1 to 2 of 2

Thread: "DISTINCT" SQL Syntax

  1. #1
    Join Date
    Dec 1969

    Default "DISTINCT" SQL Syntax

    Hi,<BR>I have rows in my access97 db containing ContactID, FirstName, LastName and OrgName.<BR>Only the Contact ID is different for allrows. Why cant I use<BR>SQLContact="SELECT DISTINCT ContactID, FirstName,LastName,OrgName FROM Contact ORDER BY LastName ASC"<BR>I can ddo it if I take out ContactID but I need this because it gets passed to another page when user clicks on hyperlink.<BR>Can anybody see how I can dispaly Distinct rows. Thanks in advance<BR>Angie

  2. #2
    Join Date
    Dec 1969

    Default RE: DISTINCT SQL Syntax

    Angie, is SQLContact a string to be fed into either an open or execute method? I generated a similar situation in one of my Access dbs and had no problem with this syntax. However, if the contactid is different for all rows, you don&#039t need the distinct keyword anyway since the rows are automatically distinct.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts