Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sql curiosity
Message
From
19/03/2010 04:00:15
 
 
To
18/03/2010 13:15:54
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01455308
Message ID:
01455660
Views:
40
But you aren't running like for like.

Your program has quite a bit of code before the select. Are you sure that when you run the snippet you have EXACTLY the same environment.



>When i run it separately it works.
>Copying it in a separate file, it works fine but with the original one the select sql gives back 0 result.
>>Are you sure you've got the same file opened in both examples
>>
>>in your code below you have
>>
>>USE D:\ElszOdosz\uh\bp_eng IN 7 ALIAS bp_eng_uh EXCLUSIVE
>>
>>is that the same file open in your snipped out example
>>
>>
>>
>>>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 ?
Previous
Reply
Map
View

Click here to load this message in the networking platform