Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL and DateTime Comparison
Message
De
26/02/2001 21:31:13
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00479826
Message ID:
00479861
Vues:
41
Jill,

You said that sometimes it works and sometimes it doesn't? Is it possible that the date/time field in the two tables has a slightly different value for the records that you think should match?

Can you test your code on copies of the two tables that have just a few records with known good matching values? That's usually a good debugging technique, and with small tables you can easily verify the correct values are there.

Better still, if you can isolate a pair of records that you think should match but fail on the SELECT statement, put just those records into your test tables (1 record in each). You then have a simpler test environment.

Your code here looks like it should work if the fields have the correct values.
Select *, prnInvcur.procdate As myprocdate ;
From prnInvCur, whInvDetail;
Where prnInvCur.Invoice = whinvdetail.Invoice ;
And prnInvCur.procdate = whinvdetail.procdate ;
Order By prnInvCur.Invoice Into Table prnInvoice
David Stevenson, MCSD, 2-time VFP MVP / St. Petersburg, FL USA / david@topstrategies.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform