March 20, 2010 at 1:12 pm
Paul White NZ (3/20/2010)
Lynn Pettis (3/20/2010)
Thinking about it, it may have been done inside a WHERE clause, not the ON portion of JOIN clause. Just not enough time to go searching through the forum posts where I have done it before when assisting others with what could be a similar (but different) problem.Don't worry about it, Lynn. The boolean transformation is pretty straight forward - I was just pointing out that in your posted code, all you did was swap an AND for an OR - you need to reverse the signs and introduce a NOT . Just an oversight on your part, I am sure...but thought I should mention it.
Okay, I must be brain dead (I am trying to do my taxes, very mind numbing) plus I already trashed my test suite, care to elaborate a bit more for me?
March 20, 2010 at 1:40 pm
Lynn Pettis (3/20/2010)
Okay, I must be brain dead (I am trying to do my taxes, very mind numbing) plus I already trashed my test suite, care to elaborate a bit more for me?
Ok. Say {A, B} = {table1.PID, table2.PID} and {C, D} = {table1.SSN, table2.SSN}
You changed (A <> B) AND (C <> D) into (A <> B) OR (C <> D).
It should have been NOT((A = B) OR (C = D)).
Paul White
SQLPerformance.com
SQLkiwi blog
@SQL_Kiwi
March 20, 2010 at 1:54 pm
Paul White NZ (3/20/2010)
Lynn Pettis (3/20/2010)
Okay, I must be brain dead (I am trying to do my taxes, very mind numbing) plus I already trashed my test suite, care to elaborate a bit more for me?Ok. Say {A, B} = {table1.PID, table2.PID} and {C, D} = {table1.SSN, table2.SSN}
You changed (A <> B) AND (C <> D) into (A <> B) OR (C <> D).
It should have been NOT((A = B) OR (C = D)).
Okay. Clears things up, amazing what "pictures" will do.
Thanks.
March 20, 2010 at 2:06 pm
Lynn Pettis (3/20/2010)
Okay. Clears things up, amazing what "pictures" will do.
No worries 🙂
Good luck with the tax calculations!
Paul White
SQLPerformance.com
SQLkiwi blog
@SQL_Kiwi
March 21, 2010 at 1:46 am
Honestly, I'm really excited.
I really like the spirit.
I thought, I posted a simple question. And I'm surprised by the solutions, counters and clarifications on each thread. The reason why it is called as a CENTRAL for SqlServer.
Thanks dear, Geeks.
🙂
---
.NET Developer
Blog: Did you say .NET?[/url]
Follow me on Twitter
September 25, 2015 at 8:34 am
Thanks,It's saved my time
Viewing 6 posts - 16 through 20 (of 20 total)
You must be logged in to reply to this topic. Login to reply