jasonhuibers
Programmer
What is wrong with this statement? I keep getting error:
Incorrect syntax near 'EventHistory'
sql_insert = "SELECT Event.EventName,Event.EventType,COUNT(*) FROM EVENT WITH (NOLOCK) " & _
"INNER JOIN EventHistory WITH (NOLOCK) ON Event.RecordNum = EventHistory.RecordNum" & _
"WHERE EventHistory.RecordNum = 2 AND EventHistory.Vendor is not null" & _
"GROUP BY Event.EventName,Event.EventType"
Incorrect syntax near 'EventHistory'
sql_insert = "SELECT Event.EventName,Event.EventType,COUNT(*) FROM EVENT WITH (NOLOCK) " & _
"INNER JOIN EventHistory WITH (NOLOCK) ON Event.RecordNum = EventHistory.RecordNum" & _
"WHERE EventHistory.RecordNum = 2 AND EventHistory.Vendor is not null" & _
"GROUP BY Event.EventName,Event.EventType"