Viewing 8 posts - 1 through 9 (of 9 total)
Here I get the results. THANKS A LOT MATE.
DECLARE @year_start DATETIME
SELECT @year_start= '03-JAN-2011'
DECLARE @year_end DATETIME
SELECT @year_end= '31-DEC-2011'
;WITH Date_range
AS
(
SELECT @year_start Start_date, DATEADD(dd,-1,@year_start+5) End_date
UNION ALL
...
July 28, 2012 at 7:35 am
Lokesh,
I think i know why it is not working on my system. But I need your help.
See The version of sql server which i'm using is 2005 and it...
July 28, 2012 at 7:27 am
Sorry friend..
I guess My computer is little just too hard to convince..
Check this code. I'm generating Friday date and could you please check sClose is able to get the value...
July 28, 2012 at 7:18 am
The values are correct.
Here is the complete code on how I'm using it taking your code and modifying it as per my needs.
DECLARE @year_start DATETIME
SELECT @year_start= '03-JAN-2011'
DECLARE @year_end...
July 28, 2012 at 6:50 am
symbolid is an autonumber. You don't need to group that.
In the logic which you wrote sClose is taking the final value may be the end of the year or any...
July 28, 2012 at 6:03 am
https://www.sqlservercentral.com/Forums/Uploads/image-unavailable.png
visit the above link and you should be able to view the image.
thanks
July 28, 2012 at 5:42 am
Hi Lokesh,
Thanks for it. 90% of the query works like charm!..
Now the problem is with sClose values.
I am executing the query with startdate = '03-JAN-2011' (MONDAY)
end date='31-DEC-2011' (SATURDAY)
sOpen,...
July 28, 2012 at 4:57 am
Hi Lokesh,
Thanks a lot for your guidance.
Your query fetches me results between the start date and end date. If the start date is 01-JAN-2011'
end date is 31-DEC-2011 (1...
July 28, 2012 at 3:10 am
Viewing 8 posts - 1 through 9 (of 9 total)