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

    Angry Unanswered: Unique index returns duplicate rows

    We are running the following query, which has a unique index on Table_2 (col1 and sys1), and Column col1 from Table_1 is unique.

    select top 100 s.*, x.col1
    from Table_1 s
    left outer join Table_2 x
    on x.col1 = s.col1 and x.sys1 = 'SYSTEM0'

    Unfortunately this query returns duplicate rows. And every time the result is different

    But once we dbcc dbreindex the unique index on Table_2, the result will not have any dups.

    Any ideas?

    Thanks

    Steve

  2. #2
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    What do you mean by dups?

    Can you post the ddl onf the tables, some sample data, and what he dups look like?

    did you do a dbcc checktable?
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

Posting Permissions

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