
January 31st, 2005, 08:35 AM
|
|
Registered User
|
|
Join Date: Jan 2005
Posts: 16
Time spent in forums: 39 m 27 sec
Reputation Power: 0
|
|
|
Exception message
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 *** is null to have an exception message if *** 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 *** VARCHAR(80);
SET ***=( SELECT pname || ' ' || pname1 FROM test
WHERE pname5=pid);
RETURN ASSIGNMENTVARIABLE;
END
|