Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Problem with point in data

Hi guys,

I have a problem with reloaded data from the MSSQL server database. I am reloading this item table and there are some items with this values in the item code field (which is the PK of the table): 234567 and 234.567. The problem is that QV interprets it as the same value - 234.567 and assignes both lines to this code. I guess it is because it regards it as a number, but is there a way to fix this problem and reload these items as different in QV. The field in sql dabase is type varchar and when I run the query on the MSSQL the results are ok - two different item codes.

This problem does not occur if I have an item with, for example, 567890 code number and the code 567.890 does not exist. In this case QV reutrns the proper item code - 567890.

I have already tried the text() function in the script but the problem is that even after the sql statement (without preceding load) the value 234567 is interpreted as 234.567 and lines are merged into one.

In the sql statement of the script I tried with CAST() and CONVERT() functions but no luck there.

Anybody had a similar problem maybe?

Thanks in advance.

Darko

1 Solution

Accepted Solutions
Not applicable
Author

Hi Jonathan,

I've just managed to solve this issue. The solution was to use the preceding load for the SQL query and use the text() function there. Prevously the script conducted the sql query by itself and afterwards the data was loaded into another table where Text() function was called on this field but it didn't seem to work that way. It actually has to be in the preceding load of the sql statement. Thanks for the effort.

Regards,

Darko

View solution in original post

2 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Darko

Have you tried loading with the Num() function, rather than Text(), as in

LOAD Num(myField) AS myField

...

;

SQL SELECT ....

Regards

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Hi Jonathan,

I've just managed to solve this issue. The solution was to use the preceding load for the SQL query and use the text() function there. Prevously the script conducted the sql query by itself and afterwards the data was loaded into another table where Text() function was called on this field but it didn't seem to work that way. It actually has to be in the preceding load of the sql statement. Thanks for the effort.

Regards,

Darko