• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 402
  • Last Modified:

How do I delete duplicate rows in and access 2007 query using SQL?

I have a query that is pulling from multiple tables.  I have some duplicate records on the VENDMAST1 table which is the AVVEND field.  With the query code I have now what woudl I have to change so that i dont get dupicate records from that field.  Thanks
SELECT BRENT_IVITMSP.ITITNM, BRENT_IVITMSP.ITITDS, BRENT_IVITMSP.ITORUM, BRENT_IVITMSP.ITSTLC, BRENT_IVITMSP.[ITVMF#], BRENT_VENDMAST1.AVNAME
FROM BRENT_IVITMSP INNER JOIN BRENT_VENDMAST1 ON BRENT_IVITMSP.[ITVND#] = BRENT_VENDMAST1.AVVEND
WHERE (((BRENT_IVITMSP.Itrecd)<>'D') AND ((BRENT_IVITMSP.ITSTCK)='Y'));

Open in new window

0
TriCountyIT
Asked:
TriCountyIT
1 Solution
 
peter57rCommented:
Just add the word Distinct after Select
0
 
TriCountyITAuthor Commented:
That was easy.  Thanks a lot
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now