Troubleshoot Archibus Update Area Totals Error
Error: ‘Arithmetic overflow error converting to data type numeric …’
Errors on these calculations:
‘— Calculate FL R/U ratio, and U/R ratio
12
13 ff.Assigned = “fl”
14 ff.AddFormula “fl.ratio_ru”, “fl.area_rentable / ” & _
15 SqlFunc_Replace0WithHuge( “fl.area_usable” )
16 ff.AddFormula “fl.ratio_ur”, “100 * fl.area_usable / ” & _
17 SqlFunc_Replace0WithHuge(“fl.area_rentable”)
18 ff.Calculate
19 ff.Clear
20
21 MsgSetThermometer 30
22
23 ‘— Calculate BL R/U ratio, and U/R ratio
24
25 ff.Assigned = “bl”
26 ff.AddFormula “bl.ratio_ru”, “bl.area_rentable / ” & _
27 SqlFunc_Replace0WithHuge( “bl.area_usable” )
28 ff.AddFormula “bl.ratio_ur”, “100 * bl.area_usable / ” & _
29 SqlFunc_Replace0WithHuge(“bl.area_rentable”)
30 ff.Calculate
31 ff.Clear
36 select *
37 FROM (select bl_id, site_id, bl.area_rentable, bl.area_usable,
38 CASE WHEN bl.area_usable = 0 OR bl.area_usable IS NULL THEN bl.area_rentable/9999999999
39 ELSE bl.area_rentable/bl.area_usable END res
40 FROM bl) x
41 WHERE res>9999
Issue: For some numbers the result is a larger number than is allowed by the field.
Example: area_rentable = 16000 and area_usable = 0.08 (service building with remaining area)
Resolution:
bl.ratio_ru and bl.ratio_ur are defined as numeric (6,2), easiest resolution is to widen bl.ratio_ru and fl.ratio_ru (10,2)
Was this helpful?
0 / 0