Error Converting Data Type Varchar to Float (Professional)

<< Click to Display Table of Contents >>

Navigation:  Professional > Troubleshooting >

Error Converting Data Type Varchar to Float (Professional)

Affected Software/Reports/DLL(s): EQuIS Professional

Affected Software Version: N/A

Symptoms: The following error can occur when running a report through EQuIS Professional:

 

Error converting data type varchar to float.

 

Cause/Details: This error is caused by non-numeric data in a field that the report expects to be numeric. Fields with the varchar data type are designed to hold any character type, but for purposes of functions such as unit conversions or action level comparisons, numeric data is required.

 

Resolution/Workaround: Identify this data and alter it so that either:

 

a.the data is numeric, or

b.the report will ignore this data (such as by setting the data to be non-reportable in the reportable_yn field).

 

If the data already appears to be numeric, extra spaces or carriage breaks may be present in the field. Clearing the field and reentering the data manually should eliminate these additional characters.

 

There are two Views in the EQuIS database that can help identify data that may lead to this error, VW_COORD_NON_NUMERIC and VW_RESULT_NON_NUMERIC. These views will show the records in DT_COORDINATE and DT_RESULT, respectively, where non-numeric data has been found. Note that certain data (e.g. latitude and longitude coordinates in non-decimal degrees or results for color) might be intended to stay non-numeric.