Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Inexact SQL match
Message
From
20/05/2001 22:49:37
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Inexact SQL match
Miscellaneous
Thread ID:
00509308
Message ID:
00509308
Views:
50
Hi every VFP users, I need to do an inexact SQL match between 2 or more tables but couldn't get it to work the way I want it. I have a patients table and a medical visits table. I need to find the last visit record of each patient in the year 1999. My SQL goes somthing like this.

SELECT name, max(dt), billamt from patient,visit where year(dt)<=1999

I could get the right date but the bill amount does not retrieve correctly from the last visit record for year 1999.

Best regards
Next
Reply
Map
View

Click here to load this message in the networking platform