tag:blogger.com,1999:blog-8428716005044606822.post1699078634650317918..comments2024-03-20T03:09:33.808-05:00Comments on the xmlsqlninja: The Tally Table (and a nifty factorial function)Alan Bursteinhttp://www.blogger.com/profile/00709822089051136584noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-8428716005044606822.post-45713656164896890032014-04-01T08:29:19.600-05:002014-04-01T08:29:19.600-05:00Hi Jeff!
Thanks for stopping by and sorry for the...Hi Jeff!<br /><br />Thanks for stopping by and sorry for the late reply; I've been working around the clock on a project deadline of today (4/1). Your solution is excellent! Very well done (as always). <br /><br />BTW. It looks like a few co-workers and I will be heading to Detroit to learn about a Partitioning System for "WORM" Tables. ;) Alan Bursteinhttps://www.blogger.com/profile/00709822089051136584noreply@blogger.comtag:blogger.com,1999:blog-8428716005044606822.post-52481847161806656702014-03-20T06:07:42.159-05:002014-03-20T06:07:42.159-05:00Hi Alan,
I'm not sure what I was doing to run...Hi Alan,<br /><br />I'm not sure what I was doing to run across this post again, but I missed a simplification the first time around. Here's the simplification..<br /><br />DECLARE @N INT ,@Factorial BIGINT;<br /> SELECT @N = 5 ,@Factorial = 1;<br /><br /> SELECT TOP (@N)<br /> @Factorial = @Factorial * ROW_NUMBER() OVER (ORDER BY (SELECT NULL))<br /> FROM sys.all_columns;<br /><br /> SELECT N= @N, Factorial = @Factorial;Jeff Modennoreply@blogger.comtag:blogger.com,1999:blog-8428716005044606822.post-23078604413671230632013-07-16T10:22:50.481-05:002013-07-16T10:22:50.481-05:00Thank you Jeff! Thank you Jeff! Alan Bursteinhttps://www.blogger.com/profile/00709822089051136584noreply@blogger.comtag:blogger.com,1999:blog-8428716005044606822.post-14712624699652319782013-06-04T01:03:28.348-05:002013-06-04T01:03:28.348-05:00Nice job and thanks for the referral, Alan. Was g...Nice job and thanks for the referral, Alan. Was good to meet you in person, as well.Anonymousnoreply@blogger.com