Symptom:
While running a report against SAP HANA a user will see the following error: "Error: QueryEngine encountered error: FetchScroll.
Error type: Odbc success with info. Odbc operation attempted: SQLFetchScroll. [01004:0: on SQLHANDLE] [SAP AG][LIBODBCHDB DLL] Data truncated."
The user will see this error if the report SQL contains a column with the smalldecimal data type. This has been identified as a SAP HANA ODBC Driver issue. Strategy obtains column information from the ODBC call SQLDescribeCol to determine how to bind results for returning to the application. The SAP HANA driver is incorrectly returning a scale of zero for the SMALLDECIMAL data type. This leads MSTR to bind the column as an integer type (no scale) which means the numbers to the right of the decimal point are removed and the driver returns a data truncation warning message.
To work around this in Strategy, edit the report attribute that has small decimal datatype.
1. Modify the attribute form
2. Modify the form expression
3. Add the following to the form expression
ApplySimple("CAST (#0 AS DECIMAL(16,4))", [DT_SMALLDECIMAL])
4. Save and close your changes and update the schema
5. You should be successfully able to run the report and view the data
Other work around options available to avoid this issue: