Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 447
  • Last Modified:

Only selecting records where row_created is >=08/01/2012 - TSQL

I am trying to select records where the row_created is >= 08/01/2012.

I have coded this statement but it is nto eliminating any records.

row_created>={ts '2012-08-01 00:00:00'}
2 Solutions
select * from tablename where row_created >= '2012-08-01'

Open in new window

should be ok.
Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
>I am trying to select records
>it is nto eliminating any records.
Which is it you wish to do, select (i.e. show) records, or delete (kill, destroy) records?

-- This selects rows where the value in the row_created column is greater than or equal to '08/01/2012'
FROM YourTable
WHERE row_created >= '2012-08-01'

-- This deletes those records from the table permanently
FROM YourTable
WHERE row_created >= '2012-08-01'
moriniaAdvanced Analytics AnalystAuthor Commented:
Thanks Guys,

Don't kill me but the problem was I had a union statement and put the statement at the end of only one of the selects not both .   DUUUUUUUH

Featured Post

Microsoft Certification Exam 74-409

VeeamĀ® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now