|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Saturday, June 01, 2013 4:52 AM
Points: 2,556,
Visits: 2,590
|
|
It would be better, if you could post your code with the results you want, rather we working blindly thinking something else
--Ramesh
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Friday, March 04, 2011 12:12 PM
Points: 14,
Visits: 63
|
|
Assuming more things than I care to list, a strored procedure might look like...
create procedure getThatWeek (@inputDate datetime) as begin set @inputDate = convert(varchar(10), @inputDate, 111) select left(datename(dw,createdate),3) as ThatDay ,NumOfRequests from YourRequestLogTable where createdate >= dateadd(dd, 1 - datepart(dw, @inputDate), @inputDate) and createdate < dateadd(dd, 8 - datepart(dw, @inputDate), @inputDate) end
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Thursday, January 26, 2012 5:26 AM
Points: 1,367,
Visits: 1,585
|
|
Prakash (12/3/2007) Dear All
I want the output in this way
Days No of.Requests Mon 5 Tue 6 Wed 7 Thu 3 Fri 2 Sat 1
I will pass only the date to the query Pls help me to solve this problem
Hmm, having misunderstood your original question (and suspecting that I'm not alone), and being curious enough about the problem, I'm wondering if you could explain it in more detail. Jeff Moden has a brilliant guideline about how to describe your question so that you can get a result you are happy with quickly :) You can access this on http://www.sqlservercentral.com/articles/Best+Practices/61537/
Regards, Andras
Andras Belokosztolszki, MCPD, PhD GoldenGate Software
|
|
|
|