I need to have a report that shows a max number of hours of 8500. If the number is more than 8500 then put that record at 8500 else print out the number.
I am creating a report in Visual Basic's Data Reporter with Sql as the backend.
Select
Col1, Col2, Case
When col3<=8500 Then col3
Else 8500
End As col3
From table1 Terry L. Broadbent
faq183-874 contains some tips and ideas for posting questions in these forums. Please review it and comment if you have time. NOTE: Reference to the FAQ is part of my signature and is not directed at any individual.
Try the following. The arithmetic should return col3 as long as it's less than 8500. Otherwise you should get 8500. It's not too elegant, but it appears to work.
Select
Col1, Col2,
((1-sign(col3-8500))*col3 + (sign(col3-8500)+1)*8500)/2 as col3
from table1
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.