472,111 Members | 1,923 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,111 software developers and data experts.

Retriving last payment date in a table with multiple vendors

6
I am trying to find the last payment date made to a vendor in a table.
This table has many vendors I will need to have a line for each vendor and what thier last payment date is.

I assume it would something like this.

SELECT vendor_id, MAX(invoice_date) AS last_invoice_date
FROM MIL_VENDOR_INVOICE_PAYMENT_MT
GROUP BY vendor_id;
Dec 22 '06 #1
3 1713
rlbSQL
6
I am trying to find the last payment date made to a vendor in a table.
This table has many vendors I will need to have a line for each vendor and what thier last payment date is.

I assume it would something like this.

SELECT vendor_id, MAX(invoice_date) AS last_invoice_date
FROM MIL_VENDOR_INVOICE_PAYMENT_MT
GROUP BY vendor_id;
Sorry I forgot to add - Is this correct?

This is just a part to a big report i am trying to produce.
Dec 22 '06 #2
ronverdonk
4,258 Expert 4TB
I am trying to find the last payment date made to a vendor in a table.
This table has many vendors I will need to have a line for each vendor and what thier last payment date is.

I assume it would something like this.

SELECT vendor_id, MAX(invoice_date) AS last_invoice_date
FROM MIL_VENDOR_INVOICE_PAYMENT_MT
GROUP BY vendor_id;
That will get the result rows you want.

Ronald :cool:
Dec 22 '06 #3
rlbSQL
6
That will get the result rows you want.

Ronald :cool:


Thank You.
Dec 26 '06 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by Karen | last post: by
4 posts views Thread by Michele Simionato | last post: by
3 posts views Thread by davidhumphrey70 | last post: by
2 posts views Thread by scott | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.