Hi

 

I'm having a problem compiling store procedure getting errors that don't
make much sense. The problem is that I need to filter any value that is
either NULL or an empty string an set to '0' character.  SP is below

 

CREATE PROCEDURE test ()

 

BEGIN 

 

DECLARE code VARCHAR(10) DEFAULT '0';

 

update table_name

set 

 filed_name =  CASE  when ISNULL(filed_name) = 1 OR
CHAR_LENGTH(filed_name) = 0  then code

                     END CASE;

 

END;

 

Thanks for any help.

Reply via email to