473,385 Members | 1,548 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,385 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 1754
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....
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...

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.