SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 select Id for a date
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

anupalavila
Yak Posting Veteran

55 Posts

Posted - 12/02/2008 :  04:23:53  Show Profile  Reply with Quote
I have a table with 3 fields Id,datafrom and dateTo how can I know the Id of a given date which falls between datefrom and dateTo for the date

Id datefrom dateTo
1 2008-11-1 00:00:00.000 2008-11-3 00:00:00.000
2 2008-11-5 00:00:00.000 2008-11-7 00:00:00.000
3 2008-11-9 00:00:00.000 2008-11-11 00:00:00.000

if I enter date as 2008-11-10 00:00:00.000 I could get the Id 3

Thanks and Regards
Anu Palavila

Edited by - anupalavila on 12/02/2008 04:34:38

madhivanan
Premature Yak Congratulator

India
22765 Posts

Posted - 12/02/2008 :  04:25:18  Show Profile  Send madhivanan a Yahoo! Message  Reply with Quote

Where @date between datefrom and dateTo

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

anupalavila
Yak Posting Veteran

55 Posts

Posted - 12/02/2008 :  04:50:56  Show Profile  Reply with Quote
Thanks for your valuable replay

Thanks and Regards
Anu Palavila
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000