Options

Both sides of comparison are same

During major rewriting of legacy code we made quite simple mistake:

Rewrite JOIN ON/WHERE condition to state when both sides were same. Usually because left/right sides were swapped in source and code is complex (10+ joins).

Maybe SQL Code Guard can detect basic cases, because code
FROM
  dbo.Table AS A
  LEFT JOIN Table AS B ON A.Col = A.Col
or
WHERE
  A.col = A.col
  AND ...
doesn't make sense.
Tagged:

Comments

Sign In or Register to comment.