Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

11
  • Thanks! this helped alot! its down to 0sec (: i just found out about the execution plan sorry for not including that. i have the same issue with wr.wr_wo_id NOT IN (SELECT..). would this the same as: ) T ON T.wr_wo_id <> wr.wr_wo_id Commented Feb 2, 2010 at 11:12
  • sorry for jumping to conclusions! but this was not the correct answer. the query above does not return the same result as when i use the IN (SELECT...) statement. Commented Feb 2, 2010 at 11:44
  • 1
    Are you sure? I might be missing something obvious, but they look equivalent to me. In what respect do the results differ? Commented Feb 2, 2010 at 12:06
  • 1
    Found a potential flaw...I've added a DISTINCT. When this was missing, then there would be duplicate rows, and the PRTotals would get too large. Commented Feb 2, 2010 at 12:46
  • 1
    I'll add it to the answer above. Commented Feb 2, 2010 at 13:56