Home     About     Design Book     DMV Book     Non Database Stuff     Contact me     Presentations     Calendar of Events     Downloads     Code Snippets      
On this page are some stuff I have created for my use or to demonstrate something for someone else that you might find useful, or not, the fact is they are here!  For downloads that went directly with a presentation I gave, go to the presentation page.  For downloads that go with one of my books, go to the design book page.
 
 
Code to create a time table (not date)
This will create a table that has a row for every minute in the day to join to a datetime type with minutes.  Gives you the ability to do a join to group by the part of the day or hour, like am_pm, half hour of the hour, or day, etc.
timeTableCreateAndLoad.sql 

Procedures to drop all types of objects in a database.

Used by me to drop objects in a database before changing the collation of a database to remove all constraints/procedures etc that had references to the columns I needed to change.

utility.drop_objects_procs.zip 

Procedures to reset disabled and non-trusted check and foreign key constraints.

I primarily use this after ETL that skips constraints due to using bulk load. If this gives any errors in the printed output, you will need to fix the constraint.

utility.constraints$ResetEnableAndTrustedStatus.sql