Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates

MSSQL Dynamic Data Type Issue for Float Datatype

No ratings
cancel
Showing results for 
Search instead for 
Did you mean: 
TalendSolutionExpert
Contributor II
Contributor II

MSSQL Dynamic Data Type Issue for Float Datatype

Last Update:

Feb 9, 2024 2:06:24 PM

Updated By:

Jamie_Gregory

Created date:

Nov 4, 2023 7:35:22 AM

When we ingest the Data from MSSQL Database and update the MSSQL.xml file from Talend Project-->General-->Metadata Talend Type as follow,

<dbType type="FLOAT">
                    <talendType type="id_Float" default="true" />

the output looks like below, which is we desired.
348|39.2
349|15.4
350|8.8
351|46.8
352|47.2
353|7.2
354|25.2
when using dynamic data mapping, it is unable to replicate the same result, and the data looks like below
348 - 39.2
349 - 15.400000000000006
350 - 8.799999999999997
351 - 46.8
352 - 47.2
353 - 7.200000000000003
354 - 25.200000000000003

workaround: is to use STR in the SQL queries and it will give desired result.
"SELECT dbo.FLOAT_TEST.Col1,
STR(dbo.FLOAT_TEST.Col2,6,1) strCol2
FROM dbo.FLOAT_TEST"
https://learn.microsoft.com/en-us/sql/t-sql/functions/str-transact-sql?view=sql-server-ver16
Labels (1)
Version history
Last update:
‎2024-02-09 02:06 PM
Updated by: