Well it *would* work but its will probably not give you what you are looking
for in the format you have it (assumption on my part). Basically what the
where clause is saying is where @someVar = (the result of the case
statement)

So assuming in your example that @someVar is coming in with a value of 'A',
this where clause will equate to  WHERE 'A' = @ARGUMENT_A.  While this
should work syntactically, I just don't see how that can be your goal.  Its
hard to tell without a clear example of what you are trying to accomplish.
If you want to post an example I can probably help you more easily.


On 3/31/06, Scott Stewart <[EMAIL PROTECTED]> wrote:
>
> Will this work
>
> DECLARE @some var
>
> SELECT    *
> FROM    MY_FAKE_TABLE
> WHERE    @some var = CASE
>             WHEN @some var = 'A' THEN @ARGUMENT_A
>             WHEN @some var = 'B' THEN @ARGUMENT_B
>             ELSE @ARGUMENT_DEFAULT
>         END
>
>


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:5:202435
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/5
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:5
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.5
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to