Welcome to MSDN Blogs Sign in | Join | Help

February 2009 - Posts

Testing strings for equality counting trailing spaces

The SQL standard requires that string comparisons, effectively, pad the shorter string with space characters. This leads to the surprising result that N'' ≠ N' ' (the empty string equals a string of one or more space characters) and more generally any string equals another string if they differ only by trailing spaces. Here is a discussion of various work arounds.

Instead of triggers over views (part 1)

Views are useful for creating a business entity based view data while allowing for an efficient logical schema. SQL Server’s instead of triggers allow many of these views to be updatable. Here are some experiments that show how to write them and some of their properties.

Large tuple uniqueness constraints in SQL Server

SQL Server 2008 limits unique constraints to 900 bytes of data per tuple. Here is a technique for enforcing uniqueness over larger tuple sizes.
 
Page view tracker