General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only