SQL Server 2005 provides a very easy way to remove duplicate values through the use of a Common Table Expression (CTE). The script below creates a temp table named #PendingAccounts. Notice that I will check in the tempdb to see if the table already exists. If it does, I will drop it. IF OBJECT_ID('tempdb..#PendingAccounts') IS NOT NULL DROP TABLE #PendingAccounts GO CREATE TABLE #PendingAccounts ( AccountID INT NOT NULL, PendingDate SMALLDATETIME, PendingAmount MONEY ) GO Below I am adding...