Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7897173
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T08:05:40+00:00 2026-06-03T08:05:40+00:00

I have the following data in a SQL Server 2000 table: Dates ———————– 2012-05-04

  • 0

I have the following data in a SQL Server 2000 table:

Dates
-----------------------
2012-05-04 01:23:45.678
2012-05-05 01:23:45.678
2012-05-06 01:23:45.678

Suppose GETDATE() returns:

2012-05-05 12:34:56.789

I need the most efficient (and elegant) query that returns rows #2 and #3 from above, the criteria being:

date portion of Dates >= date portion of GETDATE()

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T08:05:42+00:00Added an answer on June 3, 2026 at 8:05 am
    DECLARE @Now DATETIME
    SELECT @Now = DATEADD(dd, DATEDIFF(dd, 0, GETDATE()), 0)
    
    SELECT ...
    WHERE Dates >= @Now 
    

    Adapted from this and this.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a table in SQL Server 2000 with data similar to the following:
I have the following table and data in SQL Server 2005: create table LogEntries
I have a Sql Server 2005 table with following data: idHearing is the primary
I have table the following data structure in SQL Server: ID Date Allocation 1,
Programs used: SQL Server 2000, Excel 2003 We have a table in our database
SQL Server 2000 I have a table which lists out the months where a
I'm looking for answers for the following 2 questions (SQL Server 2000). I have
I have got the following exception when try to select data from SQL Server
I have some troubles trying to move data from SQL Server 2000 (SP4) to
In connection with data replication from SQL Server to DB2 I have the following

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.