Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2004
    Location
    Michigan
    Posts
    44

    Unanswered: Database redundant records... need hlep

    I am working on this access DB that has been created by some consulting firm couple of years ago, which I wasnt here at that time.

    The DB is being by college faculty members to store about students who study abroad..
    now,
    there are students who has more than one major.. and when I run query to find out how many students are studying abroad..
    it shows me more than the actual number of students who are studying abroad, because it shows same student twice because of double major..
    In other words, it inserts two records for a student who has 2 majors into the DB.

    Now my question is, is it possible to combine 2 records into one record on query results?
    I know you can do the following: SELECT StudentName = 'major + major'

    but the problem is, the name for field major is the same.. so I cannot say in my query 'Major + Major' to combine 2 records. it doesnt work..

    let me know if anyone has solution to this, that will be greatful...
    thanks,

    morad

  2. #2
    Join Date
    Mar 2004
    Posts
    480
    Not knowing what your column names are I'll give it a shot

    SELECT count(distinct STUDENTNAME) from table;

    assuming the only student names in the table are those studying abroad.

    Now it doesn't matter if there is one row for guelphdad studying math and one for guelphdad studying music, only one of them is counted.

Posting Permissions

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