Hello,
Probably there is something what I just can't recognize...
What's my problem? I try to create some function, below script:
CREATE FUNCTION unhex(in VARCHAR(32000) FOR BIT DATA)
RETURNS VARCHAR(32000)
LANGUAGE SQL
CONTAINS SQL
DETERMINISTIC
NO EXTERNAL ACTION
BEGIN ATOMIC
RETURN in;
END
Nothing special, but when I run #db2 -tvf script_with_function, a have such error:
db2 -tvf unhex_function
CREATE FUNCTION unhex(in VARCHAR(32000) FOR BIT DATA)
RETURNS VARCHAR(32000)
LANGUAGE SQL
CONTAINS SQL
DETERMINISTIC
NO EXTERNAL ACTION
BEGIN ATOMIC
RETURN in
DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0104N An unexpected token "END-OF-STATEMENT" was found following "N ATOMIC
RETURN in". Expected tokens may include: "JOIN <joined_table>". LINE
NUMBER=8. SQLSTATE=42601
DB21007E End of file reached while reading the command.
Any ide waht I do wrong?
Best Regards
Sebastian
#Db2#Db2forLUW#Support#SupportMigration