[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mysql
Subject:    Re: Date problem
From:       Nick Lindridge <nickl () heliosgroup ! com>
Date:       2000-07-24 12:49:20
[Download RAW message or body]

Marc,

If you are unable to change your infrastructure but can change the query you
do, then changing your query to use the NULLIF() function may help. This
would allow you to change the empty date string that you pass into a null at
the point of the insert.

e.g. set column1 = nullif('date string', '')

Actually, if you could do this then you could probably have changed the
infrastructure in the first place but it's a thought anyway.

Incidentally, the manual is wrong in the example for IFNULL(). According the
text it returns NULL if expr1 = expr2, else expr1, but the example is then
given as:

mysql> select NULLIF(1,1);
        -> 1
mysql> select NULLIF(1,2);
        -> NULL

Nick


-- 
---------------------------------------------------------------------
Please check "http://www.mysql.com/php/manual.php" before
posting. To request this thread, e-mail mysql-thread45143@lists.mysql.com

To unsubscribe, send a message to:
    <mysql-unsubscribe-mysql=progressive-comp.com@lists.mysql.com>

If you have a broken mail client that cannot send a message to the above \
address(Microsoft Outlook), you can use http://lists.mysql.com/php/unsubscribe.php


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic