Some background, I'm fairly new at SQL but I'm fairly decent with Queries. We need to export some data out of SQL for a vendor to work with us but for some reason it keeps returning back a lot of duplicate records. The query statement that I'm using is
SELECT
CallLogFlagData.callLogID
, UserID
, dataSourceID
, recordedByUserID
, recordingFile
, DATEPART(yyyy,startTime) AS startYear
, DATEPART(mm,startTime) AS startMonth
, DATEPART(dd,startTime) AS startDay
, stopTime
, callerID
, outboundNumber
, descr
, notes
, transferFrom
, fileHash
, isFileToBeTransferred
, custom1
, custom2
, DNIS
, callID
, recordingProfileID
, encryptionKeyID
, fromCallLogID
, toCallLogID
FROM dbo.CallLog AS CallLog
CROSS JOIN dbo.CallLogFlagData AS CallLogFlagData
WHERE DATEPART(yy,startTime)='2016'
AND DATEPART(mm,startTime)='08'
AND DATEPART(dd,startTime)='01'
We...