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
 General SQL Server Forums
 New to SQL Server Programming
 How to get all the data between dates
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

mohan123
Constraint Violating Yak Guru

India
252 Posts

Posted - 11/23/2012 :  01:10:07  Show Profile  Reply with Quote
i had a table which have percentage,Goals,StartDate and EndDate.In my requirement i need to get all the data from dates

if one user have inserted recored on 22/nov/2012 goes on like 100 users inserted

and another user inserted recored on 22/nov/2013

if i want to get the data from 22/nov/2012 and 22/nov/2013

how to write a query by passing only start date and end date as parameter

P.V.P.MOhan

bandi
Flowing Fount of Yak Knowledge

India
2208 Posts

Posted - 11/23/2012 :  03:41:00  Show Profile  Reply with Quote
Hi mohan,
I am not able to understand your requirement..
Can you explore more information?

To get data for StartDate between 22/nov/2012 and 22/nov/2013....

WHERE StartDate >= 22/11/2012 AND StartDate <= 22/11/2013



--
Chandu
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52317 Posts

Posted - 11/25/2012 :  09:22:48  Show Profile  Reply with Quote
do you mean retrieving all records of all users who has record between given date range?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

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