Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
Log in  ::  Register  ::  Not logged in
Home       Members    Calendar    Who's On

Add to briefcase ««12

Pascals Triangle, Home Work and Root Cause Analysis Expand / Collapse
Posted Wednesday, October 19, 2011 3:16 PM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Thursday, April 16, 2015 4:10 AM
Points: 59, Visits: 424
CELKO - your code does not compile. Looks like some logic is missing in the case statement.

I don't get " SELECT fact FROM Factrorials WHERE @f = @n " I @f supposed to be a column or a variable?

I like the idea of it and the recommendation of storing calendar data in table.
Post #1193262
Posted Thursday, October 20, 2011 9:30 AM



Group: General Forum Members
Last Login: Yesterday @ 10:13 PM
Points: 18,552, Visits: 16,811
Nice article.

Jason AKA CirqueDeSQLeil
I have given a name to my pain...


Posting Performance Based Questions - Gail Shaw
Post #1193846
Posted Thursday, October 20, 2011 12:18 PM



Group: General Forum Members
Last Login: Yesterday @ 8:21 PM
Points: 1,945, Visits: 3,512
David.Poole (10/19/2011)
Joe, I should have remembered that. I think one of your books mentioned storing a calendar table rather than trying to workout calendar maths on the fly.

It is so easy to forget that storing a few thousand records for utility sets costs next to nothing but delivers one hell of a lot of utility

My age is showing with the look up tables I pushed in THINKING IN SETS I remember when we did not have anything but a slide rule. The books had tables in the back. Finance books had ones for NPV, IRR; trig and log functions in math books; chemistry had stuff I never understood

The other trick is to VALUES() to construct a constant VIEW or a CTE of this stuff so you can drop it into queries.

Books in Celko Series for Morgan-Kaufmann Publishing
Analytics and OLAP in SQL
Data and Databases: Concepts in Practice
Data, Measurements and Standards in SQL
SQL for Smarties
SQL Programming Style
SQL Puzzles and Answers
Thinking in Sets
Trees and Hierarchies in SQL
Post #1193964
Posted Friday, October 21, 2011 4:07 PM


Group: General Forum Members
Last Login: Sunday, May 3, 2015 5:19 AM
Points: 2,951, Visits: 1,934
As a teenager I had a job delivering potatoes to fish and chip shops across the staffordshire plains. The boss had a book called a ready-reckoner to help calculate the bills.

I remember the books of sin/cos/tan tables, normal distribution figures etc. I also remember that they would contain small rounding errors on specific values as a means of checking whether or not a rival publisher had violated the copyright.

My first IT job had me loading 1/4 inch tapes for backup purposes. You had to master a strange TiChi maneuver to get the ultimate efficient loading technique!

Then there was the short straw of having to crawl through the roof space with a crimping tool to wire up a 25 pin plug to connect the mini-computer to dumb terminals. A job made harder by the fact that the boss used to bribe us with whiskey!

Happier times, and as Phil Factor once described, a time when having an interesting personality disorder was a pre-requisite for a career in IT.

LinkedIn Profile
Newbie on
Post #1194719
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse