jodero
Technical User
- Jan 9, 2009
- 3
I have a large table with event information from many NT servers gathered on a daily bases. I created a reference table with 3 columns where I put events that I DO NOT wish to see in the query result. I use an inner join and request the results NOT IN the inner join. Apparently this is a very inefficient way to solve my problem because I get a time-out from my front-end (i.e. Access).
I worked around the problem by creating a temporary table where I select the records on a date criterium first.
I'd like to make this a stored procedure that I will run from VBA in Access (maybe later in ASP).
Any suggestions?
I use this SQL:
SELECT *
FROM NT-Events
WHERE (RecordNum NOT IN
(SELECT RecordNum
FROM [NT-Events] INNER JOIN
Filtertabel01 ON
[NT-Events].Source = Filtertabel01.Source AND
[NT-Events].TypeOfEvent = Filtertabel01.TypeOfEvent AND
[NT-Events].EventID = Filtertabel01.EventID))
AND (DateAndTime >= '2001-07-30 00:00:00')
I worked around the problem by creating a temporary table where I select the records on a date criterium first.
I'd like to make this a stored procedure that I will run from VBA in Access (maybe later in ASP).
Any suggestions?
I use this SQL:
SELECT *
FROM NT-Events
WHERE (RecordNum NOT IN
(SELECT RecordNum
FROM [NT-Events] INNER JOIN
Filtertabel01 ON
[NT-Events].Source = Filtertabel01.Source AND
[NT-Events].TypeOfEvent = Filtertabel01.TypeOfEvent AND
[NT-Events].EventID = Filtertabel01.EventID))
AND (DateAndTime >= '2001-07-30 00:00:00')