T
Tim
I have information that I need to get from two different
tables, the first table is the sales person. The second
table holds multiple sales information for each sales
person. I only want to bring one record back for each
sales person (the record with the most recent date). the
way I was doing it was trying all the records back for
that sales person from second table. My way:
SELECT firsttbl.name, secondtbl.date, secondtbl.salesinfo
FROM firsttbl, secondtbl
WHERE firsttbl.id = secondtbl.id
ORDER BY firsttbl.name ASC, secondtbl.date DESC
How can i get the most recent record by date once per
sales person? This is for a vb6 app, for a data report.
Does anybody have any Ideas?
tables, the first table is the sales person. The second
table holds multiple sales information for each sales
person. I only want to bring one record back for each
sales person (the record with the most recent date). the
way I was doing it was trying all the records back for
that sales person from second table. My way:
SELECT firsttbl.name, secondtbl.date, secondtbl.salesinfo
FROM firsttbl, secondtbl
WHERE firsttbl.id = secondtbl.id
ORDER BY firsttbl.name ASC, secondtbl.date DESC
How can i get the most recent record by date once per
sales person? This is for a vb6 app, for a data report.
Does anybody have any Ideas?