Select Max question

Keith DeLong delong at redcort.com
Sat Jan 24 22:32:26 CST 2004


My lack of SQL knowledge is frustrating me tonight...again. I cannot figure
out how to get the latest entry for each person in a table.

I started with:

SELECT Max(Date_Entered)
FROM Matters

As expected, this returns the last entry made in the date.
However, I want the last entry for each person. So I next tried to get the
max for a given person:

SELECT Max(Date_Entered)
FROM Matters
Where Person_ID = 4

I got the same result as above. After some experimentation it seems
Valentina is ignoring the WHERE clause all together when Max is used. This
seems also true for Distinct.  Is this the normal way for SQL to work or a
Valentina oddity?

Is there is a query solution that I am missing at this late hour of a long
week?

Thanks,
Keith DeLong

V4RB 1.10/RB 5.24




More information about the Valentina mailing list