This is a discussion on plz help within the DB2 forums, part of the Database Server Software category; --> hi all, IF p_flag='I' AND v_count<>v_limit THEN INSERT INTO user_vendor_table(account_id,vendor_id,user_login_ name,user_password,type) VALUES(p_account_id,p_vendor_id,p_user_login_name, p_user_password,p_type); i have this logic inside the ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| hi all, IF p_flag='I' AND v_count<>v_limit THEN INSERT INTO user_vendor_table(account_id,vendor_id,user_login_ name,user_password,type) VALUES(p_account_id,p_vendor_id,p_user_login_name, p_user_password,p_type); i have this logic inside the procedure. i.e it won't insert if v_count not equal to v_limit. the problem is it won't return any error code or sqlstate . could any body show me how to raise user defined exception for this. thnaks and regards situ. |
| |||
| situ wrote: > hi all, > > IF p_flag='I' AND v_count<>v_limit THEN > > INSERT INTO > user_vendor_table(account_id,vendor_id,user_login_ name,user_password,type) > > VALUES(p_account_id,p_vendor_id,p_user_login_name, p_user_password,p_type); ELSE SIGNAL SQLSTATE '78001' SET MESSAGE_TEXT = 'Bad v_count'; END IF; -- Serge Rielau DB2 Solutions Development IBM Toronto Lab |