Have a stored proc for displaying customer info which appears as:
create proc custinfo @nonzero smallint as
select * from customer
The parm @nonzero (1 or 0) limits the display of customer's balances. If
@nonzero = 1 then only customers with balances <> 0 display. Otherwise
all customers display.
My issue is how best to express the where clause to accomodate @nonzero.
Currently I have: ((@nonzero = 1 and balance <> 0) or (@nonzero = 0)). Surely there's a