Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
linkblaine
Starting Member
1 Post |
Posted - 2007-07-23 : 11:05:23
|
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.TextFROM 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.MDRReportKeyWHERE 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 like261568 1/24/2000 00:00.0 M N Y 114 PLV-100 RESPIRONICS, INC. 35001 CBK261568 1/24/2000 00:00.0 M N Y 114 PLV-100 RESPIRONICS, INC. 35001 CBK261568 1/24/2000 00:00.0 M N Y 114 PLV-100 RESPIRONICS, INC. 35001 CBKSo 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"When you have everything to loose and nothing to gain, All-In is not an option" |
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2007-07-23 : 13:34:37
|
Don't think it's replication related, better to post it in t-sql forum. |
|
|
|
|
|
|
|