Change this (CURRENT_TIMESTAMP-30)
To This: DateADD(mi, -30, Current_TimeStamp)
To get the current date use GetDate().
MSDN Link to DateAdd Function
MSDN Link to Get Date Function
More Related Contents:
- Is it possible to write single query on two table which are not connected to each other?
- How to create a specific SQL Server stored procedure? [closed]
- SQL Server dynamic PIVOT query?
- SQL Server – Best way to get identity of inserted row?
- Should I use != or for not equal in T-SQL?
- How to update two tables in one statement in SQL Server 2005?
- SQL Server Process Queue Race Condition
- Create a date from day month and year with T-SQL
- How should I pass a table name into a stored proc?
- Is the NOLOCK (Sql Server hint) bad practice?
- Creating an index on a table variable
- SQL – Subtracting a depleting value from rows
- OR is not supported with CASE Statement in SQL Server
- How to set variable from a SQL query?
- SELECT FOR UPDATE with SQL Server
- Compare DATETIME and DATE ignoring time portion
- T-SQL: Selecting Column Based on MAX(Other Column)
- How to group by month from Date field using sql
- unresolved reference to object [INFORMATION_SCHEMA].[TABLES]
- SQL dot notation
- Split function in SQL Server 2008
- T-SQL How to create tables dynamically in stored procedures?
- What is the equivalent of ‘describe table’ in SQL Server?
- Curly braces in T-SQL
- Find min and max for subsets of consecutive rows – gaps and islands
- How can I group by date time column without taking time into consideration
- Update query using Subquery in Sql Server
- T-SQL: checking for email format
- Convert bigint to datetime
- When to use EXCEPT as opposed to NOT EXISTS in Transact SQL?