How would I check for a null value in the EXNABVAL program. If I have a field that can be null how would I code the program to check for it ?
Announcement
Collapse
No announcement yet.
checking for null value
Collapse
X
-
How would you code the value in an SQL statement. When I put it in the format below I am getting an error.
xec sql
SELECT COUNT(*) INTO :count
FROM MSTGLBKRH
WHERE bhmaj = :abhmaj and bhmin = :abhmin and
bhacct = :abhacct
and bhco = :companyId
and bhdiv = :divisionId
and (bhrdat= :'0001-01-01'
or bhdate> :abhdate);
5770ST1 V7R4M0 190621 Create SQL ILE RPG Object GL40VAL
DIAGNOSTIC MESSAGES
MSG ID SEV RECORD TEXT
SQL0104 30 2964 Position 37 Token '0001-01-01' was not valid. Valid
tokens: <IDENTIFIER>.
Comment

Comment