June 5, 2008 at 1:31 pm
Hi All,
I have database that holds the productivity information.
We need to create a report for monthly basis. Our company employees will work on the product and charge a billable to the client.
So i need a query it should run monthly and create a report.
Output should be..
EmployeeName Workhours Billable
XXXX 25 9.1%
YYYY 45 10%.
You need not worry about the workhours and billable.
This query should run on monthly without changing anything in the query and also without using any DTS jobs.
Thanks,
Karthik
June 5, 2008 at 1:42 pm
With all due respect, this community is for people looking for assistance, not complete solutions.
I think I speak for eveyone here in saying that we would more than happy to help you improve what you've done and even share our knowledge, but your questions implies that you want "us" to do all of the work for you.
If you have in fact tried to accomplish your goal, then please read the following article and then post the approach that you've tried.
http://www.sqlservercentral.com/articles/Best+Practices/61537/
😀
______________________________________________________________________
Personal Motto: Why push the envelope when you can just open it?
If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.
Jason L. SelburgJune 5, 2008 at 6:13 pm
Heh... bad day getting worse ol' friend? 😛
--Jeff Moden
Change is inevitable... Change for the better is not.
June 5, 2008 at 9:44 pm
Hey Jason,
This is the query i am trying to solve
Create table Billing (Id int, Name varchar(50), Workhours Varchar(20),Description Varchar(50))
Declare @strdate int
Set @strdate =datepart(mm,getdate())-1
Select name,Sum(CAST(ROUND(Workhours, 0) AS int)) as [Workhours],Sum(CAST(ROUND(Workhours, 0) AS int))/40*100 as Billable from
Billing Where Id in(2,4,6,8) and Datepart(mm,workdate)=@strdate
group by name
Datepart(mm,workdate)=@strdate
Here i got the problem
It will take all the years including. I need a current year.
Can you please assist me?
Thanks,
Karthik
June 9, 2008 at 9:32 pm
Hi All,
Thanks for your time.
I have used the date[art for the year and it worked fine.
Thanks and regards,
Karthik
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply