Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Content Management (Extended ECM)
API, SDK, REST and Web Services
How to convert a numeric field into an integer as part of a SQL calc.
Jonathan_Thomson_(jonathanthomson_-_(deleted))
Please help....I am trying to run a calculation which displays real numeric fields in the result - this works fine. But when I then try to create a pie chart of the results, livelink requests that the 2nd field is an integer. Is it possible to convert a real number into an integer as part of the Live Report code? I attach the code I have below...Select Region, 100* SUM(Lost_time_accidents___employees2) / SUM(Hours_worked___employees___thousands2) "Total Employee Accident Frequency Rate", INT, 100* SUM(Lost_time_accidents___all_personnel2) / SUM(Hours_worked___all_personnel___thousands2) "Total All Personnel Accident Frequency Rate", SUM(Lost_time_accidents___employees) "Total Lost Time Accidents Employees", SUM(Lost_time_accidents___all_personnel) "Total Lost Time Accidents All Personnel", SUM(Hours_worked___employees___thousands) "Total Hours Worked by Employees", SUM(Hours_worked___all_personnel___thousands) "Total Hours Worked by All Personnel", SUM(Ave_staff_numbers___total) "Total Staff Numbers"From Accident_SafetyWhere Year = %1 Group by RegionThanks,Jon
Find more posts tagged with
Comments
Jonathan_Thomson_(jonathanthomson_-_(deleted))
Select Region, CONVERT(int, 100* SUM(Lost_time_accidents___all_personnel2) / SUM(Hours_worked___all_personnel___thousands2)) "Total All Personnel Accident Frequency Rate", ...............