Try something like:
SELECT id, NewsHeadline as news_headline, NewsText as news_text, state CreatedDate as created_on
FROM News
WHERE CreatedDate >= DATEADD(day,-7, GETDATE())
More Related Contents:
- Calculating distance between two points (Latitude, Longitude)
- How to rewrite IS DISTINCT FROM and IS NOT DISTINCT FROM in SQL Server 20008R2?
- T-SQL split string based on delimiter
- WHERE Clause vs ON when using JOIN
- Partition Function COUNT() OVER possible using DISTINCT
- CREATE TABLE IF NOT EXISTS equivalent in SQL Server [duplicate]
- Cannot use UPDATE with OUTPUT clause when a trigger is on the table
- CASE WHEN statement for ORDER BY clause
- Script to kill all connections to a database (More than RESTRICTED_USER ROLLBACK)
- Reference an alias elsewhere in the SELECT list
- Using IF ELSE statement based on Count to execute different Insert statements
- How to find out what is locking my tables?
- Passing dynamic order by in stored procedure
- Select SQL Server database size
- Check if table exists and if it doesn’t exist, create it in SQL Server 2008
- How do I find the data directory for a SQL Server instance?
- How to return default value from SQL query
- How to concatenate all columns in a select with SQL Server
- How to automatically generate unique id in SQL like UID12345678?
- How can I do an UPDATE statement with JOIN in SQL Server?
- The multi-part identifier could not be bound
- SQL Query to get aggregated result in comma separators along with group by column in SQL Server
- how can I Update top 100 records in sql server
- Errors in SQL Server while importing CSV file despite varchar(MAX) being used for each column
- Get the records of last month in SQL server
- Log record changes in SQL server in an audit table
- alternatives to REPLACE on a text or ntext datatype
- How to create a Date in SQL Server given the Day, Month and Year as Integers
- Count records for every month in a year
- SQL Server: +(unary) operator on non-numeric Strings