The following query within i4gl is not functioning correctly. The "dteOdueDate" variable is set to "31/05/2002" yet this query still returns a row where the prem_prmdue field is "24/07/2002". If I enter the query in the iSQL tool it works. It is 4GL that gives the problem.
DECLARE match_curs CURSOR WITH HOLD FOR
SELECT e.*
FROM expected_premium e, polrule_stat_hst p
WHERE p.rule_ref = wfrule_rec.rules_id_ref
AND p.rulstend_flag is null
AND e.expdprem_ref = p.majorent_ref
AND e.dates_os_paiddt IS NULL
AND e.prem_prmdue < dteOdueDate
AND paysrcid_code = "CLIENT"
AND e.policyid_ref BETWEEN mintStartRef AND mintEndRef
ORDER BY e.prem_prmdue asc
Please help!
DECLARE match_curs CURSOR WITH HOLD FOR
SELECT e.*
FROM expected_premium e, polrule_stat_hst p
WHERE p.rule_ref = wfrule_rec.rules_id_ref
AND p.rulstend_flag is null
AND e.expdprem_ref = p.majorent_ref
AND e.dates_os_paiddt IS NULL
AND e.prem_prmdue < dteOdueDate
AND paysrcid_code = "CLIENT"
AND e.policyid_ref BETWEEN mintStartRef AND mintEndRef
ORDER BY e.prem_prmdue asc
Please help!