Repeated Row In Record Sets

Please support our MS SQL advertiser: Intel Parallel Studio Home
Reply

Join Date: Jul 2007
Posts: 1
Reputation: linkblaine is an unknown quantity at this point 
Solved Threads: 0
linkblaine linkblaine is offline Offline
Newbie Poster

Repeated Row In Record Sets

 
0
  #1
Jul 23rd, 2007
Hello All, first time post here and really stuck on this issue.

I have 4 Tables that i am Joining Across. Each one of the tables has around 800,000 Rows in it. I am Joining them all on a field Called MDRReport Key.

my query looks like this

SELECT Mdrfoit.MDRReportKey, Mdrfoit.DtReport, Mdrfoit.DateReceived, Mdrfoit.EventType, Mdrfoit.AdverseEvent, Mdrfoit.ProductProb, Mdrfoit.ReportOccup,DevTable.BrandName, DevTable.ManName, DevTable.ModelNumber, DevTable.ProductCode, DevTable.DeviceFamily, TextTable.Text

FROM Mdrfoit
INNER JOIN DevTable ON Mdrfoit.MDRReportKey = DevTable.MDRReportKey
INNER JOIN TextTable ON Mdrfoit.MDRReportKey = TextTable.MDRReportKey LEFT OUTER JOIN probLink ON Mdrfoit.MDRReportKey probLink.MDRReportKey

WHERE Mdrfoit.DateReceived BETWEEN '1/1/1995' AND '1/1/2007') AND
AND (DevTable.BrandName LIKE '&PLV%')

My problom is that when i do this i get back 3 rows in my result set for every 1 result that i want So ill get like

261568 1/24/2000 00:00.0 M N Y 114 PLV-100 RESPIRONICS, INC. 35001 CBK
261568 1/24/2000 00:00.0 M N Y 114 PLV-100 RESPIRONICS, INC. 35001 CBK
261568 1/24/2000 00:00.0 M N Y 114 PLV-100 RESPIRONICS, INC. 35001 CBK


So my result set is on average 3 time larger then its suppose to be, This is also causing my query time to be very very slow.

There are no Duplicate entries in the database where all of the fields are the same. I am confused on if this is a problom in my query. Any advice would be great
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC