Hi all,
Currently I am working on a SQL query which I can't seem to get working properly.
I want to gather distinct data from a table with a timestamp of 5 minutes before localtime.
I've gotten so far:
I need to use the DATEDIFF function and gather the data from 5 minutes ago but I really do not have a clue on how to use this function.
Can someone point me in the right direction?
Thanks in advance...
- Raenius
"Free will...is an illusion"
Currently I am working on a SQL query which I can't seem to get working properly.
I want to gather distinct data from a table with a timestamp of 5 minutes before localtime.
I've gotten so far:
Code:
SELECT DISTINCT ROUTERS.name AS Router_Name
FROM ROUTERS INNER JOIN
PINGS ON ROUTERS.routerID = PINGS.routerID AND ROUTERS.threshold < PINGS.rtt
WHERE (PINGS.[timestamp] > GETDATE()) -??????
I need to use the DATEDIFF function and gather the data from 5 minutes ago but I really do not have a clue on how to use this function.
Can someone point me in the right direction?
Thanks in advance...
- Raenius
"Free will...is an illusion"