Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Andrzejek on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Informix Date Comparison

Status
Not open for further replies.

IanKidd

Programmer
Jun 21, 2002
5
GB
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 = &quot;CLIENT&quot;
AND e.policyid_ref BETWEEN mintStartRef AND mintEndRef
ORDER BY e.prem_prmdue asc


Please help!
 
do you have a field with the same name as the variable?
i.e. do you have a field called dteODueDate in table e, or p if so, Informix might be confusing them.

 
No, the variable dteODueDate is definately a unique name.
 
Ian:

I hate to elaborate on the obvious, but is your DBDATE variable set consistently between your iSQL tool and your 4GL environment?

Regards,


Ed
 
When I try to dbimport a database, I get the message failed to do a 'string to date conversion'. i want to know how can I set the &quot;DBDATE&quot; variable manually?
 
sashook:

Since DBDATE is a unix shell variable, and under the Korn shell:

export DBDATE=MDY4/

Regards,


Ed
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top