Microsoft
Software
Hardware
Network
Question : SQL Query
Hi,
I have the following tables.
Vendors - V
Items - I
Vendor Items (Which has a combination of Item and Vendor as its primary key) - VI
VI has a comment field with numeric values - COMMENT_1
I want to get all records from V along with the greatest COMMENT_1 in VI where V.VENDOR = VI.VENDOR
Thanks in advance. I hope my question is clear.
Ariel
Answer : SQL Query
Here is your corrected query:
SELECT *
FROM PO_VEND V
INNER JOIN (SELECT VEND_NO,
MAX(COMMNT_1) COMMENT_ONE
FROM PO_VEND_ITEM
GROUP BY VEND_NO
) VI ON V.VEND_NO = VI.VEND_NO
Random Solutions
Viewing "Attibute Editor" in ADUC.
Insert values in listbox to access table
MS Access 2003 Record Filter Question
Can we enable the guest account on a machine
Date Comparison in MSSQL
Importing mmf file into Outlook
Set Word 2010 as default for .doc and .docx
error saying 'External table is not in the expected format.' when trying to update database from a dataset
Mailbox unavailable. The server response was: 5.7.1 Unable to relay
Change Required Error Message - Access 2007