Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 How to get all the data between dates

Author  Topic 

mohan123
Constraint Violating Yak Guru

252 Posts

Posted - 2012-11-23 : 01:10:07
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
Master Smack Fu Yak Hacker

2242 Posts

Posted - 2012-11-23 : 03:41:00
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

52326 Posts

Posted - 2012-11-25 : 09:22:48
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
   

- Advertisement -