Help needed
- Date: Fri, 29 Sep 2006 12:52:20 -0500
- From: "Feliks Shvartsburd" <fshvartsburd@xxxxxxxxxxx>
- Subject: Help needed
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.
- Prev by Date: RE: comparing two databases
- Next by Date: Quick way to determine existence of an index?
- Previous by thread: Re: perl/dbi - insert into server2.db2.table2 select * from server1.db1.table1
- Next by thread: Help needed
- Index(es):