Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exception message

Status
Not open for further replies.

oana12

Programmer
Jan 6, 2005
21
CA
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top