Are you sure you're running against exactly the same database?
In other words, the only thing that may cause this behavior is
1. Wrong date formats
2. Different data sets
3. Different SET DELETED setting.
I see no other way the results will be different except for also a corrupted index, may be.
>Thanks but it didnt help either.
>
>>>I use a prg containing only app. 20 select queries.
>>>They give the right results except the one I enclosed.
>>>It results 0, which obviously false.
>>>The interesting thing is that when I make a selection of the
>>>code snippet enclosed and click on "Execute selection", it gives the right result.
>>>Any idea?
>>>
>>>
>>>lcDateInd = {2010.01.01 00:00:00}
>>>lcDateErk = {2010.02.01 00:00:00}
>>>lcDateStor = {2000.01.01 00:00:00}
>>>
>>>
>>>SELECT count(bp_eng_uh.engkod) as db;
>>>from bp_eng_uh;
>>>where bp_eng_uh.alairva >= lcDateInd;
>>>AND bp_eng_uh.alairva < lcDateErk;
>>>AND bp_eng_uh.stornozva < lcDateStor;
>>>into cursor osszesUH
>>>
>>>
>>
>>Since you're passing datetimes, it will make more sense to name the variables as
>>
>>ltDateInd = datetime(2010,1,1)
>>ltDateErk = datetime(2010,2,1)
>>ltDateStor = datetime(2000,1,1)
>>
>>Also, could it be different SET DELETED setting affecting the output ?
If it's not broken, fix it until it is.
My Blog