Strange error with date field (Online 5.01)
Posted in 1996
Dear Informixers,
after a problem with the system date on one of our machines (an offline
backup program set the date one day ahead, which was only recognized the
next day), the following problem persists on I-Online 5.01 on a SNI RM400
under SINIX 5.41C1004:
One table contains a date (opdat), which is usually set by a program via
the system date. The following query will result "3":
SELECT COUNT(*) FROM edomorg WHERE opdat = "19.09.1996"
while the following will result "0":
SELECT COUNT(*) FROM edomorg WHERE opdat = "20.09.1996"
The following returns "0 rows deleted":
DELETE FROM edomorg WHERE opdat = "20.09.1996"
while the following returns an error:
DELETE FROM edomorg WHERE opdat = "19.09.1996"
240: Could not delete a row.
105: ISAM error: bad isam file format.
I did the suggested "tbcheck" (-ci/-cI), which showed no error on the
index.
Another strange finding is:
SELECT opdat FROM edomorg WHERE opdat BETWEEN "19.09.1996" and "20.09.1996"results in:
19.09.1996
19.09.1996
19.09.1996
3 rows found
while the following more general query:
SELECT * FROM edomorg WHERE opdat BETWEEN "19.09.1996" and "20.09.1996"
results in "20.09.1996" in the "opdat" column of all three rows!!!
To add something on top:
SELECT * FROM edomorg WHERE opdat = "19.09.1996" (or "20.09.1996")
results in "no rows found".
I'm absolutely clueless as to what's happening here. Help!
Regards, Richard
--
+----------------------------+-------------------------------------------+
| Dr. Richard Spitz | INTERNET: spitz@ana.med.uni-muenchen.de |
| EDV-Gruppe Anaesthesie | Tel : +49-89-7095-3413 |
| Klinikum Grosshadern | FAX : +49-89-7095-8886 |
| 81366 Munich, Germany | |
+----------------------------+-------------------------------------------+