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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2005-08-31 : 07:37:14
|
| Joe writes "I have two tables and I use the inner join to create a recordset. I get multiple dulicates as a result. I don't know how to get around this. Here is the code:USE CAATDBSELECT CaseResistances.*,Chamber.Mean AS ch_mean, Chamber_Index.Chamber AS ch_chamber, Case1.Bsa AS c1_bsa FROM CaseResistances INNER JOIN Chamber ON (CaseResistances.Case_ID=Chamber.Case_ID)AND (CaseResistances.Condition_Number=Chamber.Condition_Number) INNER JOIN Chamber_Index ON Chamber.Chamber_Index = Chamber_Index.Chamber_Index INNER JOIN Case1 ON CaseResistances.Case_ID = Case1.Case_IDWHERE (CaseResistances.Case_ID = 23) AND (CaseResistances.Condition_Number = 1)This supposed to return two records but it returns two of each!23 1 1280 84.74577 42.37288 0 5 2.5 59 80 AO 20023 1 1280 84.74577 42.37288 0 5 2.5 59 3 LV 20023 1 1230.769 88.13559 44.06779 1 5.2 2.6 59 80 AO 20023 1 1230.769 88.13559 44.06779 1 5.2 2.6 59 3 LV 200Joe Szakacs" |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-08-31 : 07:47:29
|
| Posting the table structures would be helpfulWhich data do you want only AO or LV?MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|