I thought this syntax was correct, but I can't figure out why it won't work. Maybe it just is not supported?
This is not my exact query, but you get the drift. All my logic is correct in my SP. I want to be able to turn PAID to include or not include...
Thanks,
Michael C. Gate
Code:
CREATE PROCEDURE spTEST @includepaid bit AS
SELECT FIELD FROM TABLE
WHERE
SOLD = 1
AND CUSTOMER = 2
CASE
WHEN @includepaid = 1 THEN AND [Paid] = 1
END
Thanks,
Michael C. Gate
Comment