null in conditional?
I need to convert Dynamic to Static SQL
Dynamic SQL:
IF @typeWeb = 1
BEGIN
SET @where = @where + ' AND p.Dealer is null '
END
ELSE
IF @typeWeb = 0
BEGIN
SET @where = @where + ' AND p.Dealer is not null '
END
How can i type this code?
(typeWeb = 1 AND p.Dealer is null) OR (typeWeb = 0 AND p.Dealer is not null)
Thank you, I guess I need to get away from the screen a little bit 🙂
Обсуждают сегодня