*facepalm* sorry about the earlier code. Try this again:
Alternatively:
SELECT
*,
CASE WHEN column2 <> 'AP' THEN 1 ELSE 0 END AS APtest,
CASE WHEN column3 <> 'U' THEN 1 ELSE 0 END AS Utest,
CASE WHEN column2 <> 'AP' AND column3 <> 'U' THEN 1 ELSE 0 END AS APUtest
FROM
@Table1
WHERE
NOT ( column2 = 'AP' AND column3 = 'U')
Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.
For better assistance in answering your questions[/url] | Forum Netiquette
For index/tuning help, follow these directions.[/url] |Tally Tables[/url]
Twitter: @AnyWayDBA