How to display sum at the bottom of one column field name!

  • When I use your code in my test db I can produce the sum row, so I guess your problem is only to display it at the bottom instead of the top of the selection.

    If that is so, just add another (synthetic) column that creates an order in which the sum is last.

    For your ordering seems to be date, I'd suggest to use a varchar field sortOrder with the formula ' '+convert(varchar, ClearedDate, 126) for each row and 'z' for the sum row.

    Prepending the blank char makes all values less than 'z', so your sum row will appear at the end, if you use order by sortOrder asc to sort the output.

    WM_HOPETHATHELPS

    Guenter

Viewing post 1 (of 2 total)

You must be logged in to reply to this topic. Login to reply