When loading a field of type VarChar(MAX) from SQL Server, values longer than 4001 characters are loaded as NULL. The issue happens with SQL Server Connector of Qlik ODBC Connector Package, and not with generic ODBC / OLE DB connections.
- Open the following config file C:\Program Files\Common Files\Qlik\Custom Data\QvOdbcConnectorPackage\QvOdbcConnectorPackage.exe.config. Make a backup of the file before modifying.
- Locate the following entry: <add key="mssql-reading-strategy" value="engine" />
- Change entry to: <add key="mssql-reading-strategy" value="connector" />
- Save config file and reload the connection
With this change, there is a slight performance penalty but the precision/correctness of the data will improve.
An alternative solution is to use generic ODBC / OLE DB connection with native SQL Server ODBC / OLE DB drivers.Environment:
- Qlik ODBC Connector Package up to 4.8.0 (Qlik Sense April 2018)