|
Posted by Alex on 06/22/06 13:15
Erland Sommarskog wrote:
>
> For the example table, this should work:
>
> SELECT Number, first, last, difference = first - last
> FROM (SELECT Number,
> first = coalesce(Jan, Feb, Mar, Apr, May, Jun),
> last = coalesce(Jun, May, Apr, Mar, feb, Jan)
> FROM tbl) as s
>
>
That's exactly what I'm looking for! I didn't know this function
existed, even after reading through several books and online resources.
Thanks :)
Alex
Navigation:
[Reply to this message]
|