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 «««3738394041

The "Numbers" or "Tally" Table: What it is and how it replaces a loop. Expand / Collapse
Author
Message
Posted Friday, January 03, 2014 9:40 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Friday, January 03, 2014 6:26 PM
Points: 112, Visits: 214
Disney uses a AS/400 based PMS which uses sequences on every record. I never started a conversation as to it purpose, but I'm assuming that it provides a means of (almost) guaranteeing that each transaction record (regardless of table) is (almost) uniquely identified. The sequence reset at 10,000,000,000. Depending on the retention level, the same sequence number could appear more than once at the same time in the db regardless of table. The probability of the same sequence number occurring more than once in the same table being miniscule. If memory serves the primary key was composed of the transaction date plus the sequence number. I can't remember if the sequence was stored separately or combined with the trans date. It's only been 13 years.
Post #1527626
« Prev Topic | Next Topic »

Add to briefcase «««3738394041

Permissions Expand / Collapse