Archive for April, 2009

Dropping Default Constraints in MSSQL

I came across this today: Working With Default Constraints

Basically, if you script any sort of table changes in MSSQL you will eventually need to use this code. In MSSQL’s infinite wisdom they made default values on NOT NULL columns occasionally have a mysterious constraint. Ordinarily, constraints on fields on tables are easily found in INFORMATION_SCHEMA.TABLE_CONSTRAINTS; but, these particular constraints are hidden for whatever reason.

This makes removing them programmatically very difficult, since they insist on putting a timestamp/guid on the end of each auto-generated default constraint. SO, this useful page on the MSDN provides a way to query the actual name of the constraint given the table name and column name. This, allowing you to remove it before you do something completely crazy like delete the column.

Of course, if your not in to scripting your database migrations then you can just use Management Studio and delete the column.

Comments (1)

Lighting Stores Amuse Me

I was out shopping for valence lighting today. Just your plain old fluorescent bulb under the cabinet sort of stuff. I went to the two “big” place in town after giving up on the box stores. First store didn’t impress me much on price and the second was even worse (and this was the store I bought all my fixtures at…). When the sales rep asked why I was so perplexed; so, I explained…

Read the rest of this entry »

Comments (1)

My Review of the Ramada Inn @ Regina

Last week I headed to Regina to work on-site for one of our clients. The last time I was in Regina I booked myself into a hotel with no pool/hot tub. Since I’m half-fish that didn’t work out so well for me. This time around I got it right and booked myself into the the Ramada. This is where my story begins…

Read the rest of this entry »

Comments (1)