Re: Functions and NULL with standard install

2007-03-26 Thread Shawn Green
Hello Lucas, [EMAIL PROTECTED] wrote: I don't see how to use this here, I will have to research the |/||/| select rpad(|IFNULL(|null, ''),5,'1'); |/||/| The function you want to use is IFNULL() documented here:http://dev.mysql.com/doc/refman/5.0/en/control-flow-functions.html Try it

Re: Functions and NULL with standard install

2007-03-21 Thread Lucas . CTR . Heuman
I don't see how to use this here, I will have to research the |/||/| select rpad(|IFNULL(|null, ''),5,'1'); |/||/| but this below works thank you SELECT RPAD(CASE WHEN NULL IS NULL THEN '' ELSE '2' END, 5, '1'); If you are using it on an actual field, you would replace the first NULL and t

Re: Functions and NULL with standard install

2007-03-21 Thread Francesco Riosa
select rpad(|IFNULL(|null, ''),5,'1'); |/||/| [EMAIL PROTECTED] ha scritto: I am running a basic install of MySQL 5.0 with "strict mode" turned on I would like to use RPAD however at times a NULL var will be sent to the function. My goal is to have a function that will convert the NULL to a

Re: Functions and NULL with standard install

2007-03-21 Thread Joshua Marsh
On 3/21/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: I am running a basic install of MySQL 5.0 with "strict mode" turned on I would like to use RPAD however at times a NULL var will be sent to the function. My goal is to have a function that will convert the NULL to a blank string to get th

Functions and NULL with standard install

2007-03-21 Thread Lucas . CTR . Heuman
I am running a basic install of MySQL 5.0 with "strict mode" turned on I would like to use RPAD however at times a NULL var will be sent to the function. My goal is to have a function that will convert the NULL to a blank string to get the result of EXAMPLE3 if a NULL is returned. EXAMPLE 1