Guest User

Untitled

a guest
Oct 19th, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. select cast(replace('12,5',',','.') as float)
  2. select cast(replace('12.5',',','.') as float)
  3.  
  4. select cast(replace('2.012,5',',','.') as float)
  5. select cast(replace('2,012.5',',','.') as float)
  6.  
  7. SELECT @Fuelunits =
  8. CASE
  9. WHEN ISNUMERIC(TRY_PARSE(@Hoeveelheid AS decimal(9,2) USING 'nl-NL')) = 1 Then CAST(TRY_PARSE(@Hoeveelheid AS decimal(9,2) USING 'nl-NL') AS FLOAT)
  10. ELSE CAST(TRY_PARSE(@Hoeveelheid AS decimal(9,2) USING 'en-US') AS FLOAT)
  11. END
Add Comment
Please, Sign In to add comment