I'm new to SQL somewhat so bear with me if this is a n00b question. So my code runs something akin to the following:
(select "Balance."CodeValue" AS "CodeValue"
, "Balance"."OtherValue" AS "OtherValue"
from "SomeDB"."dbo"."AValue" "Balance"
where ("Balance"."CodeValue" between 'A' and'Z'
or "Balance"."CodeValue" in ('ABCDEFG'))
and "Balance"."CodeValue" NOT in ('XYZ', '1234', 'Etc')
or "Balance"."CodeValue" between 'A' and 'Z') "Balance"
on "SomeMatrix"."CodeValue" = "Balance"."CodeValue"
Reading it, it would seem that it checks for the "Balance"."CodeValue" to be between A and Z or in 'ABCDEFG' and not in 'XYZ', '1234', 'Etc' or between A and Z. Wouldn't the two checks for A and Z cancel each other out?
Thank you ahead of time for your assistance.