|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Friday, May 10, 2013 11:15 AM
Points: 40,
Visits: 345
|
|
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.
|
|
|
|
|
SSCoach
         
Group: General Forum Members
Last Login: Yesterday @ 1:07 PM
Points: 18,733,
Visits: 12,332
|
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Tuesday, January 15, 2013 11:11 AM
Points: 1,945,
Visits: 2,782
|
|
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
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Today @ 9:35 AM
Points: 2,749,
Visits: 1,407
|
|
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
|
|
|
|