473,403 Members | 2,338 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 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 1755
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

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

Similar topics

1
by: The Blob | last post by:
Hi all, I have a problem trying to generate the u/m list of customer. I am trying to generate a list of customer whoes last commence date is jan 04 to current. It is part of a billing...
3
by: AndyBell | last post by:
Hi all! I have an Access 2000 database for the Habiat for Humanity where I work. This is the second database I have written and it gets a bit more complex each time... I have learned much and...
2
by: Karen | last post by:
I inserted this statement and it worked great for the customers that have no payment history, but for the customers that have a history and an open invoice, it still used today's date in the mix...
4
by: Michele Simionato | last post by:
Look at this example: >>> import psycopg >>> psycopg.__version__ '1.1.19' >>> import datetime >>> today = datetime.datetime.today() >>> co = psycopg.connect('') >>> cu = co.cursor()
2
by: Rlcohen70 | last post by:
Hello, I have two tables that have a relationship based on a customer ID. The first table Customer has: Customer ID Name Address etc Accounts Table has: Customer ID
3
by: davidhumphrey70 | last post by:
Hi, I am in serious need of some help PLEASE? I have a 4 tables (April data, May data, June data and July data) with numerous fields. Each of the tables has its own "Passed for payment to...
4
by: kjflash | last post by:
Hi, Let's say I have a table containing payment information: CustID, PaymentDate, PaymentAmount. Here is some sample data: CustID Date Amount 01 ...
1
by: myemail.an | last post by:
Hi all, I am a novice to Access, and was wondering if I could get some help on a problem I can't solve. I have a database with customer payments, structured like this: customer code type of...
2
by: scott | last post by:
Hi Everyone, I have a table which has many fields in it but I need to pull some specific info via a query and I don't know if it's possible. I want to run a query which includes two tables....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.