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?
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?