Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server ASP
|
SQL Server ASP Discussions about ASP programming with Microsoft's SQL Server. For more ASP forums, see the ASP forum category.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server ASP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 29th, 2007, 01:49 AM
Authorized User
 
Join Date: May 2004
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
Default Select Query with dates

Hi all,
I have doubt in Selecting records from the Table is as

tblName

ID int
  Name varchar(100)
stdate datetime
endate datetime


Now i need to retrive Name from the table by following condtion

if the Start Date is 08/01/07 and the End Date is 09/01/07 the records should be selected from the table on 08/01/07 at 12:00:01AM and should not be selected on 09/01/07 at 11:59:59 PM

Please post ur thoughts/answers.....

Mike



 
Old July 12th, 2007, 05:34 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Quote:
quote:records should be selected from the table on 08/01/07 at 12:00:01AM and should not be selected on 09/01/07 at 11:59:59 PM
What do you mean by that, do you want to do a date range search or just based on start date alone? What date format is that? mm/dd/yy or dd/mm/yy?

_________________________
- Vijay G
Strive for Perfection





Similar Threads
Thread Thread Starter Forum Replies Last Post
Append Query (Dates) Neal Access VBA 5 November 20th, 2007 09:08 AM
Need to query dates after 90 days old melkin SQL Language 9 October 30th, 2007 08:03 AM
SELECT from SELECT query? seananderson Access 1 October 12th, 2007 12:40 AM
Incremental dates in query lizhaskin VB Databases Basics 0 October 6th, 2005 02:21 AM
Select Query Help dbartelt Access 1 June 13th, 2005 08:06 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.