Viewing 15 posts - 1 through 15 (of 83 total)
Hi Jonathan,
Your query worked a treat, thank you!
October 30, 2021 at 3:04 pm
Hi JOnathon,
I see my mistake I should have used Partion by StartDate!
Must have been sleeping!
Is there any simpler way of doing it tho or is that the best way (again...
October 30, 2021 at 11:19 am
Hi Jeff,
Good questions Jeff, its in development so not sure exactly what to do with results yet?
If Client has only one row then leave it out of the results set,...
October 30, 2021 at 11:15 am
SURE, I mean to do and forgot, here it is now...
tblClientService (ID, ClientID, StartDate, Status (1/0), ServiceType(1-100), WklyHours)
INSERT INTO tblClientServiceVALUES (100, '2021-01-01', 1, 21, 5.0);
INSERT INTO tblClientService VALUES (100, '2021-02-22',...
October 29, 2021 at 11:33 pm
Thanks for your quick reply at the moment is on sql server 2008r2, so it doesnt have LAG I think...
October 29, 2021 at 9:06 pm
Good to know, thank you very much...
I tried looking in the tempdb database, but can see the #TmpTable. Can it be veiwed through SSMS ?
Also do I need to create...
July 15, 2019 at 1:26 pm
Hi Thank you,
I was thinking that temp tables may work alright, what is the diff between #Tmp Table and ##TmpTable?
kind regards
July 15, 2019 at 10:02 am
Hi,
I replaced the recursive SELECT with a WHILE loop (which I don't like doing so if there's any other way, please let me know) and it all worked!!!...
August 27, 2018 at 5:15 am
Hi,
Jonathans answer worked for most of my query except recursive SELECT..
I'm now getting an error
Msg 2770, Level 16, State 1, Procedure GetMonthlyApptCrosstab, Line 33
August 27, 2018 at 3:24 am
Hi Guys, thank you so much for your replies, I will start using them.
Jonathan looks like he has the solution for me!
Joe I've little experience with...
August 24, 2018 at 4:23 pm
Thats all true,
But I find a simple example is best when demonstrating/explaining complex functionality such as recursion etc.
Thanks Again guys
August 9, 2016 at 9:41 am
Hi David,
That is exactly what I was looking for...
I wonder tho can it be done recursively!
kind regards
August 9, 2016 at 7:14 am
Hi Dixie,
Thanks for that, I am sure there are a number of alternative ways to solve the problem and I am always interested in looking and understanding other ways.
I was...
August 9, 2016 at 2:15 am
Hi,
My original question was along the lines of I have a table that has three columns
Table Sales (HHArea, WeekEnding, SalesAmount)
There are 6 area's with 52 weeks of sales for...
August 8, 2016 at 12:58 pm
Viewing 15 posts - 1 through 15 (of 83 total)