Hi,
We are trying to create a simple DB in DB2 9.5.400.576 Enterprise, but we had no joy so far.
We have used (IBM) Command Center, (IBM) Command Line and Toad for DB2.
Thatīs one procedure we tried to create (for testing purposes - "test" table exists):
SET SCHEMA = SA@
SET CURRENT PATH = "SYSIBM","SYSFUN","SYSPROC","SYSIBMADM","SA"@
CREATE PROCEDURE "SA".PTest ( IN p_name VARCHAR(4) )
LANGUAGE SQL
NOT DETERMINISTIC
NO EXTERNAL ACTION
CONTAINS SQL
CALLED ON NULL INPUT
BEGIN
SELECT * FROM test WHERE name = p_name;
END@
It doesn't matter which Store Procedure we are trying to create, we always get the same fucking error:
ERROR [42601] [IBM][DB2/NT] SQL0104N An unexpected token "*" was found following "INPUT BEGIN SELECT". Expected tokens may include: "(". LINE NUMBER=8. SQLSTATE=42601
I found on many forums about the statement delimiter. We have also tried that (we choose @) but strangely enough we get the same error.
I have no idea what could be happening.
Any help will be much appreciate.
Cheers