Hi
I have created a query that is suppose to display the results of opportunities won during a time period the user selects.
When I run the report, I get 5 rows of the exact same result.
How come I am getting this?
How do I fix this please?
DECLARE @DateStart DATE = '2011/02/25'; DECLARE @DateEnd DATE = '2015/12/27'; DECLARE @User VARCHAR(100) = 'Linda Smith'; SELECT OPP.customeridname AS 'Customer Name', OPP.contactidname AS 'Contact Name', OPP.actualclosedate AS 'Actual Close Date', OPP.actualvalue AS 'Actual Value', OPP.createdbyname AS 'Created By Name', OPP.createdby AS 'Created By ID', TBU.businessunitidname AS 'Business Unit Name', TBU.businessunitid AS 'Business Unit ID' FROM dbo.FilteredOpportunity AS OPP INNER JOIN dbo.FilteredUserSettings AS TBU ON OPP.createdby = TBU.createdby WHERE OPP.actualclosedate BETWEEN @DateStart AND @DateEnd ORDER BY TBU.businessunitid ASC;