sql - using a searched case in where condition -
I have recently got this stored procedure where it is using a markmark code called variable called
< P> In my selected statement, I would like to receive every market except Southern if the application passes futile. and marketcode =! 'South'
If someone passes an unnecessary value, then I will use one instead.
and marketCode = 'North'
How can I join one in both of these?
AND marketCode = (case @marketcode when zero & lt; .. not equal to 'south' .. .. & gt; Other & lt; .. equal to 'south' (End.)
You can call it a or
The condition should be able to be accompanied by:
... AND ((@marketcode is tap & marketcode & lt; & gt; 'south') or (@markcod not faucet and marketcode = @marketcode))
Comments
Post a Comment