Quote:
Originally Posted by v8625
something very basic, e.g.:
BEGIN
select current date from sysibm.sysdummy1;
END;
|
Compound SQL is subject to the same rules as SQL in stored procedures. In particular, you have to return the query result into something: SELECT CURRENT DATE INTO MYVAR_DATE FROM...
Also, a compound statement does not end with a semicolon.