• I was thinking more along the lines of just declaring a variable, assigning the value and it automatically encrypts or encodes to the proper base.  You're right, there's probably not much benefit to that over a UDF, except to say "look what I did."  But then again, I'm not seeing much value in UDT's overall so far, except to say "look what I did."

    My main point is that UDT's will probably work best for simple scalar types as opposed to aggregated, de-normalized types that consist of 2 or more separate pieces of information.  I think the SQL 2000 "Money" datatype implementation is a prime example of the things that can go wrong when you try to create such a data type.

    I also don't see any benefit to declaring an ItemStock or other Inventory UDT.  What's the "total" of 3 hammers, 2 nails and 1 piece of wood in my inventory?  Is it less than an inventory of 3 french hens, 2 turtledoves and a partridge in a pear tree?

    Performing scalar (or even aggregate) functions on a UDT like this doesn't seem to make a lot of sense...  Once again, before inventories are summed accountants usually prefer they be converted to a common UOM - usually dollars representing an assigned value of each item; although it could also be weight, size, or any other common measure.