Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2003
    Posts
    18

    Unanswered: Too many records in View

    I am trying to create a very simple view to associate the EVP from an HR data table (TBLCCINFORMATIONFEBRUARY04) of 65,000 records with the entries in a lost savings table (TBLCCYEARTOTALS) of 1,939 records. This is the View query:
    SELECT dbo.TBLCCYEARTOTALS.*, dbo.TBLCCINFORMATIONFEBRUARY04.EVPREPORTNAME AS EVPREPORTNAME
    FROM dbo.TBLCCYEARTOTALS INNER JOIN
    dbo.TBLCCINFORMATIONFEBRUARY04 ON dbo.TBLCCYEARTOTALS.VPAWID = dbo.TBLCCINFORMATIONFEBRUARY04.VPAWID

    The view is returning 2,516,488 records, and I can see the same data repeating over and over again. What am I doing to create these additional records?

    Thanks!
    -Doug Picanzi

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    My guess is that you only included one column of your primary key in the join. If the same value existed for the VPAWID column in every row of both tables, you could get 126+ million rows in your result set.

    -PatP

Posting Permissions

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