Results 1 to 5 of 5

Thread: unique records

  1. #1
    Join Date
    Dec 2003
    Location
    York PA
    Posts
    11

    Unanswered: unique records

    I have a query (that comes from 2 tables where several of the fields are identical) where it creates multiple duplicate records when the query runs. The unique record property is set to yes. Aargh!

  2. #2
    Join Date
    Dec 2002
    Posts
    117

    Can you explain

    Can you try and explain a little more as to what you are trying to accomplish?

  3. #3
    Join Date
    Dec 2003
    Location
    York PA
    Posts
    11
    I am trying to write a municipal tax collection program. I have a table for school taxes and a second table for municipal taxes. The property info in both tables is identical, and the tax info is different, although not all records may be in both tables. I am writng a query for a report that shows what taxes have not been paid, based on whether the "date paid" field is or is not null. When I run the query, some records show up 5 or 6 times, which is not a good thing.

  4. #4
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    you will have to show us your query

    i suspect you are doing a join, which might have a "cross join" effect, as multiple rows from each table are matched on all combinations of date paid

    you may want to do a union instead
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  5. #5
    Join Date
    Oct 2003
    Posts
    706

    Lightbulb

    Unique records, or unique values? Yes, there is a difference between the two, and it is the very difference that you seek!
    ChimneySweep(R): fast, automatic
    table repair at a click of the
    mouse! http://www.sundialservices.com

Posting Permissions

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