Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2004
    Posts
    58

    Unanswered: Hide duplicates in query

    I have a query that pulls in 3 columns of data from an ODBC external source.

    All the columns have multiple identical values in various combinations, eg:

    RecID, TSet, Subj
    1000, a1, Eng
    1000, b1, Mat
    1000, c5, Sci
    1005, a1, Eng
    1005, a5, Eng
    1005, b3, Mat
    1005, c5, Sci
    etc

    I want to modify the query, or create a new one, that will hide records where columns RecID and Subj are identical, id doesn't matter which of the multiple entries is not included (ie, in the above example the 4th or 5th column should not be shown).

    Any Ideas?
    Last edited by HilcrRWise; 12-01-04 at 12:34.

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    select distinct(RecID,Subj) from table xxxxx order by yyyyyyy

    it might be distinct (recid), distinct(subj) - rtfhs
    hth

  3. #3
    Join Date
    Sep 2004
    Location
    Charlotte, NC
    Posts
    164
    You can either create a new query just like this one or use this query. In design view, click the Sigma (S) button on your tool bar, which will insert a Total: line in you query design grid. Leave your RecID and Subj fields as 'Group By' but change your TSet field to 'First' (or Last, or Min or Max; whatever you want).

    TD

Posting Permissions

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