( field + 0 ) to order character ( number ) fields ??
Posted in 1994
It's been kicked around a little about adding 0 to a character field to
get values of a range or to sort correctly numeric CHAR fields. Has
anyone come across ISQL core dumping when trying to add 0.00 ( since the
result is a decimal expression, I thought I would try to add 0.00 ).
This works:
SELECT * FROM table WHERE ( field + 0 ) BETWEEN 1 AND 100;
and this works:
SELECT ( field + 0 ) FROM table ORDER BY 1;
and this works:
SELECT * FROM table WHERE ( field + 0.00 ) BETWEEN 1 AND 100;
This causes ISQL to core dump:
SELECT ( field + 0.00 ) FROM TABLE ORDER BY 1;
Any reasons? :-)
By the way:
SCO UNIX 3.2.2
INFORMIX-4GL Version 4.10.UC3 ( C-Code )
INFORMIX-4GL Version 4.10.UC3 ( P-Code )
INFORMIX-SQL Version 4.10.UD2 ( SE )
Robert Minter |Data Systems Support| \\\\\\_///
Programmer, Software Development | Orange, CA | ( _ _ )
internet: rob@dssmktg.com | Tel: 714.771.0454 | (| ^ |)
bangpath: uunet.uu.net!dssmktg!rob| Fax: 714.771.3028 | \\`-'/
#include <disclaimer.h> SURF'S UP \\_/