• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

SQL Query Help

wantedSpidy

Senior member
I can't seem to solve this (what I think should be simple to accomplish) ->

I have a proc with a bunch of input arguments. I need to add 2 arguments to it, lets call them isA and isB. isA and isB are some flag, that are independent and can only have the value 'Y' or 'N'.

Part of my proc queries some table 'master', which has columns isA and isB.

3 cases ->
- If none of the 2 arguments are passed, then don't check to see isA = master.isA, and isB=master.isB
- If isA is passed then check to see if isA = master.isA
- If isB is passed then check to see if isB = master.isB
- If both are passed then check both

The only way I can think of to solve is by writing dynamic sql in my proc, surely there must be an easier way? no?
 
Back
Top