Does anyone see anything wrong with this sql statement? I'm getting a syntax error on the last join
VB Code:
strMySQL = "" strMySQL = strMySQL & "INSERT INTO usys_temp_exception_list " strMySQL = strMySQL & "( user_id" strMySQL = strMySQL & ", exception_id )" strMySQL = strMySQL & "SELECT " & CurrentUserInfo.lngUserID & " AS user_id" strMySQL = strMySQL & ", [Exception Condition Reports].[Exception ID] AS exception_id" strMySQL = strMySQL & " FROM ([Exception Condition Reports]" strMySQL = strMySQL & " LEFT JOIN [Exceptions Copy History] ON [Exception Condition Reports].[Exception ID] = [Exceptions Copy History].[Exception ID])" strMySQL = strMySQL & " LEFT JOIN [Exceptions Routing History] ON [Exception Condition Reports].[Exception ID] = [Exceptions Routing History].[Exception ID]" strMySQL = strMySQL & " LEFT JOIN detail_exception_actions ON [Exception Condition Reports].[Exception ID] = detail_exception_actions.[Exception ID]" Debug.Print strMySQL
Thanks in advance




Reply With Quote