SELECT * FROM #Request.prefix_db_lookup#.Training_Log LEFT OUTER JOIN #Request.prefix_db_lookup#.Employee on (Training_Log.Employee = Employee.Employee_ID or Training_Log.Created_By = Employee.Employee_ID or (Employee.Last_Name = substring_index(Training_Log.Employee,' ',1) or Employee.First_Name = substring_index(substring_index(Training_Log.Employee,' ',2 ), ' ', -1))) WHERE Training_Log.Agency_ID = '#session.AgencyId#' AND Training_Log.Agency_ID = Employee.Agency_ID AND Created_Date > '2017-01-01' AND Training_Log.Deleted <> 1 GROUP BY Training_Log.Train_ID
Training Log
Encrypted_Emp_ID=encrypt(#Employee_ID#,"54kczhzgHTj4a8n+SRZPyg==","AES","Hex");
Employee Training Step Training Date Notes
#Last_Name#,#First_Name# #Train_Step# #DateFormat(Train_Date,'yyyy-mm-dd')# #Notes#
There is no Training Log history for this Agency