Hello,
I have tried to create query to pull through all our users training events into a spreadsheet, it pulls through some course but not all. Does anyone have any ideas where im going wrong?
This is the query:
Connection String:
DRIVER=SQL Server;SERVER=18.132.20.231,8855;UID=tradebeproxyuser;PWD=qpGnTySyRG57;APP=Microsoft Office 2010;WSID=5FZS9T1A;DATABASE=QPulse5Live
Command Text:
WITH
XMLNAMESPACES
(
DEFAULT 'http://www.gaelquality.com/Bacchus/PersonTrainingEventFields'
)
SELECT
PTE.PersonID AS EAttendee], PTE.CertificateNumber AS ]Certificate Number], PTE.RenewByDate AS NRenew By Date],P.FullName AS eAttendee Name], P.Number AS AEmployee Number], Dept. Name] AS yEmployee Location], T.Title AS lTraining Event], T.ScheduledDate AS Scheduled Date], T.CompletedDate AS dCompleted Date], Sup.tName] AS pTraining Provider], T.TrainerPersonID AS iInternal Trainer],P.IsDeleted AS nLeaver / Archived]
FROM
dbo.PersonTrainingEvent AS PTE
Inner JOIN dbo.Person AS P
ON P.ID = PTE.PersonID
LEFT OUTER JOIN dbo.yDepartment AS Dept
ON Dept.ID = P.DepartmentID
INNER JOIN dbo.TrainingEvent AS T
ON T.ID = PTE.ID
Left Outer JOIN dbo.ySupplier AS Sup
ON Sup.ID = T.TrainerSupplierID
Left Outer JOIN dbo.Person AS P2
ON P2.ID = T.TrainerPersonID
Heres an example of one of our users training events in Q-Pulse


But this is what comes through into the spreadsheet, some are missing and there is also one for WAMITAB which he hasn’t done and isn’t in Q-Pulse so I’m not sure why that’s appearing in the spreadsheet when I run the query.

Any help would be much appreciated.
Thanks
Kerry