Hello,
I try to run the sample code in 【user defined routine and data type
developer guide.pdf】 the page number is 3-2,ids version is 11.5
CREATE ROW TYPE emp_t
(name VARCHAR(30), emp_num INT, salary DECIMAL(10,2));
CREATE ROW TYPE trainee_t (mentor VARCHAR(30)) UNDER emp_t;
CREATE TABLE trainee OF TYPE trainee_t;
INSERT INTO trainee VALUES (sam, 1234, 44.90, joe);
CREATE FUNCTION func1 (arg1 trainee_t) RETURNING row;DEFINE newrow trainee_t;
LET newrow = ROW( sam, 1234, 44.90, juliette);
RETURN newrow;
END FUNCTION;
EXECUTE FUNCTION
func1 ((SELECT * from trainee where emp_num = 1234))
it report SQL Error (-574): A subquery has returned not exactly one
column.Actually the table has only 1 rows.
Do anybody know how to correct the problem? thanks.