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 |
|
fabianus76
Posting Yak Master
191 Posts |
Posted - 2009-02-23 : 06:04:58
|
| Hello all !I have the following query : SELECT RecPlus.ID, Product.ID FROM RecPlus INNER JOIN Product ON RecPlus.Element_ID = Product.Element_ID AND RecPlus.MetaCharacteristic_ID = Product.MetaCharacteristic_ID AND RecPlus.Origin_ID = Product.Origin_IDI know that this should give me a record, but it doesn't !In fact what I discovered is that RecPlus.MetaCharacteristic_ID and Product.MetaCharacteristic_ID are both null in this case. When I get this part of the query off (AND RecPlus.MetaCharacteristic_ID = Product.MetaCharacteristic_ID) the result is correct. Now I wonder why this is so? Isn't it true that null = null? And if it isn't, how to I have to writ it down in order to make that the MetaCharacteristic_ID fields are inclueded in the join, and that if they are both null, they are counted as equal. Thanks a lot for any feedback !Best regards, Fabianusmy favorit hoster is ASPnix : www.aspnix.com ! |
|
|
fabianus76
Posting Yak Master
191 Posts |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
|
|
|