I\'m writing an SQL Query, where a few of the columns returned need to be calculated depending on quite a lot of conditions.
I\'m currently using nested case stateme
a user-defined function may server better, at least to hide the logic - esp. if you need to do this in more than one query