Hi,
I create a function and I want for NO FOUND (no data found) or for too many rows to have some exceptions messages. If ASS is null to have an exception message if ASS return more than one row to have an exception message. How can I do this?
My function is :
CREATE FUNCTION test (
pid FLOAT
)
RETURNS VARCHAR(80)
BEGIN ATOMIC
DECLARE ASS VARCHAR(80);
SET ASS=( SELECT pname || ' ' || pname1 FROM test
WHERE pname5=pid);
RETURN ASSIGNMENTVARIABLE;
END
I create a function and I want for NO FOUND (no data found) or for too many rows to have some exceptions messages. If ASS is null to have an exception message if ASS return more than one row to have an exception message. How can I do this?
My function is :
CREATE FUNCTION test (
pid FLOAT
)
RETURNS VARCHAR(80)
BEGIN ATOMIC
DECLARE ASS VARCHAR(80);
SET ASS=( SELECT pname || ' ' || pname1 FROM test
WHERE pname5=pid);
RETURN ASSIGNMENTVARIABLE;
END