Viewing 15 posts - 46 through 60 (of 76 total)
I see, thanks. As it's scanning the tally table row-by-row from start to the predicate value, the order of N may be important in some cases (not this example), such...
March 21, 2016 at 5:29 am
Thanks, I've used that great article in the past. Most of the examples I've seen for using a tally table return a rowset, such as a CSV splitter. What I'd...
March 19, 2016 at 1:03 pm
Thanks for the confirmation. I do find the terminology confusing: alerts notify you of events, and jobs have notification on the outcome of running it.
November 30, 2012 at 3:59 am
That's fantastic, thanks! Works a treat.
Just changed: CASE WHEN T.N % 5 = 0 THEN 364 + 7 ELSE 364 END
so that it adds on an extra week each 5th...
May 8, 2012 at 1:09 pm
Thanks. My lack of knowledge, I didn't know you could bulk insert into a table with an identity column - I thought that all columns had to match.
January 18, 2012 at 2:27 pm
Thanks to all, that's great. Yes, I'm storing these dates in a table for future use.
Last one, a variation on the same, this time to find future Fridays.
select @CalendarDate =...
November 11, 2011 at 9:59 am
Thanks.
I've just checked and my two Ref columns could actually be up to 50 wide which I think is the reason I had the clustered index only on the...
November 1, 2011 at 8:34 am
"Never, never use MONEY data types; their math is wrong!"
Bit off topic but I wasn't aware of this and have used MONEY columns occasionally. Could you elaborate and should I...
October 28, 2011 at 1:02 pm
October 28, 2011 at 4:54 am
Just an update, decided to abandon the cursor method for calculating running totals and went straight to the Quirky Update - followed Jeff's article to the letter and it works...
October 27, 2011 at 8:57 am
Imagine that you have 20 rows in the outer query and you need an aggregation of 10-50 related records in another table (TableB) for each of the 20. If...
October 21, 2011 at 2:09 am
I think I've covered that one by rebuilding the running totals from the earliest date in the table that will be affected by the new batch of rows. Of course...
September 15, 2011 at 2:19 pm
I'm actually opposed to storing running totals in permanent tables for various reasons we can get into later.
Given the implications for me, you'd better tell me sooner rather than later....
September 15, 2011 at 11:58 am
Thanks to all for the advice, I'll go away and try to re-write my running total...code will follow if I hit problems!
There seems to be two issues:
1. How to calculate...
September 14, 2011 at 1:48 am
Thanks. I presume it can be done without a calendar table, but on looking at the link provided I can see the advantages of it as I have to do...
September 5, 2011 at 2:36 am
Viewing 15 posts - 46 through 60 (of 76 total)