Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

TIMESTAMP value neither NULL or NOT NULL

21 views
Skip to first unread message

Tony.D...@cunation.com

unread,
Oct 7, 2008, 12:43:23 PM10/7/08
to
I have a TIMESTAMP field named CLOSED in a table named MEMBER. An odd
thing is occurring with one record in this table. The CLOSED field
seems as though it is neither NULL or NOT NULL.

These two statements give EOF:
SELECT ACCOUNTNO, CLOSED FROM MEMBER
WHERE ACCOUNTNO=75071
AND CLOSED IS NULL

SELECT ACCOUNTNO, CLOSED FROM MEMBER
WHERE ACCOUNTNO=75071
AND CLOSED IS NOT NULL

However, if I execute this statement with no CLOSED criteria, I get a
good result, but the CLOSED field looks blank:
SELECT ACCOUNTNO, CLOSED FROM MEMBER
WHERE ACCOUNTNO=75071

These two statements seem to fix it temporarily:
UPDATE MEMBER
SET CLOSED = CURRENT_DATE
WHERE ACCOUNTNO=75071

UPDATE MEMBER
SET CLOSED = NULL
WHERE ACCOUNTNO=75071

After the above two update statements are executed, this statement
gives a good result:
SELECT ACCOUNTNO, CLOSED FROM MEMBER
WHERE ACCOUNTNO=75071
AND CLOSED IS NULL

The very next day though, I run the same select statements (CLOSED IS
NULL, and CLOSED IS NOT NULL) and they give EOF again! AFAIK, this
record isn't being updated from day-to-day. I have "fixed" it two
days in a row now.

Does it sound like this database is experiencing corruption, or could
it be something else?

0 new messages