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.
| Author |
Topic |
|
krish001
Yak Posting Veteran
61 Posts |
Posted - 2009-10-12 : 06:41:50
|
| Iam having a query where i need people availability.....in a projectselect people from table where projectstratdate >=fromdate and projectfinishdate <= todate iam using this query, from and to dates are parameters which user enters it is working but my problemfromdate and Todate are same i need availability of people.....plz let me know which condition can i use????urgent |
|
|
Nageswar9
Aged Yak Warrior
600 Posts |
Posted - 2009-10-12 : 06:45:53
|
| Hi, Try this onceselect people from table where CONVERT(VARCHAR(32),projectstratdate,101) >= @fromdate and CONVERT(VARCHAR(32),projectfinishdate,101) <= @todate |
 |
|
|
krish001
Yak Posting Veteran
61 Posts |
Posted - 2009-10-12 : 07:09:19
|
quote: Originally posted by Nageswar9 Hi, Try this onceselect people from table where CONVERT(VARCHAR(32),projectstratdate,101) >= @fromdate and CONVERT(VARCHAR(32),projectfinishdate,101) <= @todate
This is the query iam using.....select distinct(ResourceName)from MSP_EPMPROJECT_USERVIEW P,MSP_EPMRESOURCE_USERVIEW R, MSP_EPMASSIGNMENT_USERVIEW AWHERE P.PROJECTUID= A.PROJECTUID AND A.RESOURCEUID= R.RESOURCEUIDAND AssignmentStartDate between @FromDate and @ToDate and AssignmentFinishDate between @FromDate and @ToDateExample when assignment is between 01-01-2009 to 05-05-2009between this period resource name will not show this is working for me....but when i give from as '01-01-2009 'and todate as '01-01-2009 ' still resource must not come......but iam getting resource. |
 |
|
|
bklr
Master Smack Fu Yak Hacker
1693 Posts |
Posted - 2009-10-12 : 07:17:02
|
| select distinct(ResourceName)from MSP_EPMPROJECT_USERVIEW P,MSP_EPMRESOURCE_USERVIEW R, MSP_EPMASSIGNMENT_USERVIEW AWHERE P.PROJECTUID= A.PROJECTUID AND A.RESOURCEUID= R.RESOURCEUIDAND @FromDate between AssignmentStartDate and AssignmentFinishDate @ToDate between AssignmentStartDate and AssignmentFinishDate |
 |
|
|
krish001
Yak Posting Veteran
61 Posts |
Posted - 2009-10-12 : 07:27:38
|
quote: Originally posted by bklr select distinct(ResourceName)from MSP_EPMPROJECT_USERVIEW P,MSP_EPMRESOURCE_USERVIEW R, MSP_EPMASSIGNMENT_USERVIEW AWHERE P.PROJECTUID= A.PROJECTUID AND A.RESOURCEUID= R.RESOURCEUIDAND @FromDate between AssignmentStartDate and AssignmentFinishDate @ToDate between AssignmentStartDate and AssignmentFinishDate
still it is not workingg plz give sln |
 |
|
|
|
|
|
|
|