Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL SELECT fails with DateTime Joins
Message
De
21/11/2000 18:08:03
 
 
À
21/11/2000 17:38:18
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00444351
Message ID:
00444402
Vues:
11
I copied your code into TEST.PRG and ran it as is. My result was 56.5467%. However, when I modified the code to like this, TTOC(dt.datetime,1) = TTOC(crmaxdt.datetime,1), I got 100%.

Upon further examination of my VFP settings, I found that I had the "Use System Settings" check box checked in my Tools:Options:Regional setttings. Unchecking this box and switching the Date Format between Short and American produced different results. American produced the 100%.

I have enough info here to continue. Thank you very much for your help. Also, Erik Moore responded with key info as well.


>Sure. The erroneous results I was getting was that the number of records found was wrong, so I simply did a check on the reccount.
** TestLoop.prg
>LOCAL lnCnt, lnLoop
>EndFunc
>
>>Could you attached your code? Maybe I am doing something different.
>>
>>>>Looping thru the original code 5000 times produced the "correct" answer only 19% of the time. We modified the code with your "TTOC" suggestion, and looped thru another 5000 times; the "correct" answer was produced 55%, NOT 100%, of the time. Better, but nothing I want to rely on.
>>>>

>>>
>>>Hmm. I just did the same test 10 times with 15000 iterations and it worked 100%
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform