Results 1 to 3 of 3

Thread: sql problem

  1. #1
    Join Date
    Jan 2003

    Unanswered: sql problem

    i have two tables each with the following fields:
    NumberOfAbsences; LastName; MiddleName;FirstName; Studentid; YearNo.

    I want to combine them, adding the NumberOfAbsences fields to each other.

    part of the problem is that not every student is in both tables. so studentid 1 might have 3 absences in the first table but isn't listed at all in the second. in the combined table he should be listed with 3 absences.

    any ideas

  2. #2
    Join Date
    May 2002
    Atlanta, GA
    You should first start by using a union query. Then using, if needed a select distinct query.

  3. #3
    Join Date
    Jan 2003
    Thanks for that. I used the Union query and then a Select Sum query.

    Works fine

Posting Permissions

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