Monday, August 30, 2010

Regular Expressions in SQL 2008 R2

At last! Supported, official regular expression support in SQL Server! It’s a bit of a hack, so I may have to redact the “supported” comment. But here are the fully-documented scripts you get when you install Master Data Services on SQL 2008 R2.

Here’s how to extract them and use them on your own database (only tested on R2, but I suspect any edition of SQL server that supports the CLR would work with these; you will need R2 to install MDS, however):

  • Install MDS from D:\MasterDataServices\x64\1033_ENU
  • Run the Configuration Manager and set up a new MDS database. You will be copying from here and into your own database.
  • Script the Microsoft.MasterDataServices.DataQuality assembly (right click / Script as / Create)
    image
    image
  • Change the AUTHORIZATION to db_datareader
  • Find the functions you need (most under scalar, some under table), and right click, script, create:
    image
    image
  • Delete the USE block, and change the namespace to dbo, or one of your own.
    image
  • Run all of the scripts on your own database, starting with the assembly.

Saturday, August 21, 2010

Space Pen

You know that frustrating feeling when you pick up a pen and it doesn’t write? You scribble and shake it, but it doesn’t do much.

I decided a while ago to try one of those “space pens” to see if its pressurized ink cartridge would solve that problem, and it 100% does. If you want an inexpensive pen that reliably writes the first time, every time, with a continuous, even flow, check these guys out. I went with this model, which fits in my pocket when closed and opens to a comfortable writing size. It’s still just a ballpoint pen and writes like one, but it has a nice weight and balance. All for under $11. Worth every penny.

Fisher Space Pen, X-Mark Bullet Space Pen, Matte Black (SM400BWCBCL)