I have written a below query to see what are the possitive and negative integer values from a table fields. But I am not sure how to fetch only negative integer values.
DEFINE TEMP-TABLE ttdata NO-UNDO
FIELD iValue1 AS INTEGER
FIELD iValue2 AS INTEGER
.
CREATE ttdata.
ASSIGN
iValue1 = 122
iValue2 = -122
.
FOR EACH ttdata NO-LOCK:
DISP iValue1 iValue2.
END.
>Solution :
a query just about one field where field < 0
FOR EACH ttdata NO-LOCK
WHERE ttData.iValue2 < 0:
DISP iValue1 iValue2.
END.
when you have two fields with or, but dont use it on a real database table because it is very slow without any index
FOR EACH ttdata NO-LOCK
WHERE ttData.iValue2 < 0
OR ttData.iValue1 < 0:
DISP iValue1 iValue2.
END.