Correctly compare numeric field values

This commit is contained in:
Eike Kettner
2021-03-03 01:58:24 +01:00
parent d4006461f6
commit 1c834cbb77
7 changed files with 60 additions and 9 deletions

View File

@@ -0,0 +1,5 @@
-- Create a function to cast to a numeric, if an error occurs return null
-- Could not get it working with decimal type, so using double
create or replace function CAST_TO_NUMERIC (s char(255))
returns double deterministic
return cast(s as double);