About 93,300 results
Open links in new tab
  1. sql - Datetime in where clause - Stack Overflow

    How can I select 12/20/2008 in where clause of sql? The server is SQL server 2005. select * from tblErrorLog where errorDate = '12/20/2008'

  2. SQL SELECT WHERE with date and time - Stack Overflow

    Dec 12, 2011 · I have a SELECT query where I want to find all rows whose DATE and TIME are between 2011-12-11 23:00:00 and 2011-12-12 23:00:00 I try to do it with WHERE but row is …

  3. sql - How do I use select with date condition? - Stack Overflow

    Jan 20, 2009 · In sqlserver, how do I compare dates? For example: Select * from Users where RegistrationDate >= '1/20/2009' (RegistrationDate is datetime type) Thanks

  4. SQL - where date = max date - Stack Overflow

    Jul 14, 2016 · MAX (C.Date) in the initial select works here but wanted to utilize the WHERE clause items in other queries where I'd do Count's. So was hoping to figure out how to get the …

  5. How do I query for all dates greater than a certain date in SQL …

    Mar 4, 2010 · Too many Database Systems store date values in a varchar field, but you're right about the format. Normally, when using conversion I add in the format specifier as well, but I …

  6. sql - Oracle DateTime in Where Clause? - Stack Overflow

    Jan 26, 2011 · This is because a DATE column in Oracle also contains a time part. The result of the to_date() function is a date with the time set to 00:00:00 and thus it probably doesn't match …

  7. sql - Using a date value in where clause on a datetime data type ...

    Jun 4, 2019 · 0 Is there anything I should be cautious of when using a date in the where statement if the field I am filtering on is a datetime? Does WHERE Date = '20190604' actually …

  8. CAST(DATETIME AS DATE) over WHERE clause - Stack Overflow

    Jul 9, 2014 · SELECT MyDateTimeColumn FROM MyTable WHERE CAST(MyDateTimeColumn AS DATE) = '2014-07-09' is a slower way to trim the time over DATETIME columns, I have …

  9. Select data from date range between two dates - Stack Overflow

    Jan 8, 2013 · Now what is the query if I want to select sales data between two dates from a date range? For example, I want to select sales data from 2013-01-03 to 2013-01-09.

  10. sql server - Using DateTime Variable In Where Clause - Database ...

    Mar 30, 2016 · Declare the @datetime as a datetime2. Then alter the @sql query to:- Set @sql = 'Select * FROM #dinonuggets WHERE saledate >= ''' + cast( @datetime as varchar(23)) + ''' ' …