Why do I get SQL0104N in UDB 8.1 for Windows Command Center -
Interactive, when I copy-paste-and-execute this function from the
docs?
FWIW I have % defined as the statement terminator, but appending a %
to the input just gives a different error: SQL0007N The character "%"
following "BEGIN-OF-STATEMENT" is not valid.
Here's the function from the docs:
CREATE FUNCTION TAN (X DOUBLE)
RETURNS DOUBLE
LANGUAGE SQL
CONTAINS SQL
NO EXTERNAL ACTION
DETERMINISTIC
RETURN SIN(X)/COS(X)
Here's the full error message:
SQL0104N An unexpected token "RETURN SIN(X)/" was found
following "BEGIN-OF-STATEMENT". Expected tokens may include:
"<create_view> ".
Explanation:
A syntax error in the SQL statement was detected at the specified
token following the text "<text>". The "<text>" field indicates
the 20 characters of the SQL statement that preceded the token
that is not valid.