Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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
Darko
Have you tried loading with the Num() function, rather than Text(), as in
LOAD Num(myField) AS myField
...
;
SQL SELECT ....
Regards
Jonathan
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