I have a question about using greater and less than in a case statement.
CASE value
WHEN > 10 THEN Something
WHEN < 10 THEN SomethingElse
...
END
This doesn't work. The "> <" is not valid syntax, the following statement would work:
CASE
WHEN value > 10 THEN Something
WHEN value < 10 THEN SomethingElse
...
END
My Question is "value" is actually a query and it doesn't seem right to me that I should repeat the rather complex query for every wHEN clause. What's the best way to handle this?
Thanks
CASE value
WHEN > 10 THEN Something
WHEN < 10 THEN SomethingElse
...
END
This doesn't work. The "> <" is not valid syntax, the following statement would work:
CASE
WHEN value > 10 THEN Something
WHEN value < 10 THEN SomethingElse
...
END
My Question is "value" is actually a query and it doesn't seem right to me that I should repeat the rather complex query for every wHEN clause. What's the best way to handle this?
Thanks