469,072 Members | 1,846 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,072 developers. It's quick & easy.

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 1641
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
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.