Hi all!
I got it to work! :-)
And all I did was replacing IS NULL with = '-00-00 00:00:00' in
the DELETE-statement...
Does anyone have an explanation for this...?
Regards,
Evert
Michael Stassen wrote:
Evert wrote:
Hi all!
Who can tell me why the following does not work...?
When
Hi Evert, all!
Evert Meulie wrote (re-ordered):
Michael Stassen wrote:
Evert wrote:
Hi all!
Who can tell me why the following does not work...?
When I do:
SELECT COUNT(*) AS counter FROM table1 WHERE condition1 = 'A' AND
condition2 IS NULL;
it returns:
+-+
| counter |
+-+
I'll double-check it on another MySQL server I have here (uses same
version of MySQL) and will file a bug report if I indeed can replicate
the problem.
Thank you all for the swift replies! :-)
Regards,
Evert
Joerg Bruehe wrote:
Hi Evert, all!
Evert Meulie wrote (re-ordered):
Michael
Evert wrote:
Hi all!
Who can tell me why the following does not work...?
When I do:
SELECT COUNT(*) AS counter FROM table1 WHERE condition1 = 'A' AND
condition2 IS NULL;
it returns:
+-+
| counter |
+-+
| 2 |
+-+
Then I do:
DELETE FROM table1 WHERE
Hi,
Query OK, 0 rows affected (0.00 sec)
It did not find/delete any rows - please double-check your
conditions and make sure you are using the same set as for
the SELECT statement.
Best regards,
Aleksandar
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To
Hi!
I'm entering the statements exactly as listed in my message (only done a
search/replace on table-name).
So SELECT says there are 2 records, but then DELETE does not see those
same 2 records... :-/
Is there something like a verbose/debug mode in which I can see more
precise why my
Hello Evert,
i just entered your example and had no unusal behaviour on MySQL 5.0:
mysql describe table1;
+++--+-+-+---+
| Field | Type | Null | Key | Default | Extra |
+++--+-+-+---+
|
I'm using MySQL 4.1.21 (on Gentoo). Should this make any difference?
Regards,
Evert
Rocco wrote:
Hello Evert,
i just entered your example and had no unusal behaviour on MySQL 5.0:
mysql describe table1;
+++--+-+-+---+
| Field | Type
Hello Evert,
i actually do not know and don't have access to a 4.1 Machine. What you
could try is to use the alternative way of testing if a value is NULL:
Maybe the behavior of IS NULL has been changed in 5.0 .
DELETE FROM table1 WHERE condition1='A' AND condition2=NULL
Greets
Rocco
Evert
Hi!
I tried your tip, but = gives the same result as = when I execute the
query... :-/
Regards,
Evert
Rocco wrote:
Hello Evert,
i actually do not know and don't have access to a 4.1 Machine. What you
could try is to use the alternative way of testing if a value is NULL:
Maybe the
Hello Evert,
the = Operator can not work with NULL values , so you have to use = or
IS NULL. I have no clue why its not working at your side, but i assure
you that it must be a rather simply problem (typo, table definition).
Are you sure your definition2-column allows NULL values in the first
Oops, that was just a typo in my previous reply. My script does use 'IS
NULL' and not '= NULL'. I also tried '= NULL'. No luck...
Evert
Rocco wrote:
Hello Evert,
the = Operator can not work with NULL values , so you have to use = or
IS NULL. I have no clue why its not working at your
12 matches
Mail list logo