1 of 1 people found this helpful
I solved the problem by using REPLACE in the SELECT statement. Due to localization (on both the RDBMS and the PI Interface servers?) I had to do a replace from ',' to '.' in order for it to work.
But, I got double tag values for each value even though Location2 is set to 0. This was fixed by adding "TOP 1" in the SELECT statement.
So, this is our final and working SELECT statement:
SELECT TOP 1 res_date, CAST(REPLACE(resultat,',','.') AS VARCHAR), 0 [cw4_prod_ny].[dbo].[viewResultat] WHERE todo_jobbid = ? AND ISNUMERIC(resultat) = 1 ORDER BY res_date DESC;