Error: near line 1: near "FUNCTION": syntax error
Error: near line 5: near "DECLARE": syntax error
Error: near line 6: near "DECLARE": syntax error
Error: near line 9: near "SET": syntax error
Error: near line 10: near "SET": syntax error
Error: near line 13: near "SET": syntax error
Error: near line 15: near "RETURN": syntax error
Error: near line 16: cannot commit - no transaction is active
Error: near line 19: no such function: CalculateF