Tag Archives: SQL

Trimming that hard to reach whitespace

Not all whitespace is created equal, and when LTRIM and RTRIM in T-SQL fails to remove leading and trailing space its easy to stare and panic.  Having worked on a lot of ETL pipelines and legacy databases lately I’ve encountered some pretty nasty data sources and eyebrow-raising moments. In one particular case, I encountered fields […]

Continue reading

Hierarchical Data: Applying Data Structures

In my previous post I walked through persisting hierarchical data using closure tables.  While closure tables are a great technique for persistence we need a more approachable way to deal with the hierarchy in the application layer.  Since we are dealing with a hierarchy it stands to reason that we could benefit from a tree-like […]

Continue reading

Hierarchical Data: Persistence via Closure Table

Recently, I’ve been working with hierarchical data using closure tables.  The problem this technique solves for me is persisting hierarchical relationships of specific entities without any restriction on the size of the hierarchy and while providing a simple way to query the hierarchy.  Closure tables, above other solutions like path enumeration, maintain referential integrity.

Continue reading

Handling IIS Logs with Microsoft’s Log Parser

So you have a mountain of IIS logs, and you or someone in your organization is asking questions the answers to which might be found in that endless stream of log data.  There are many ways to analyze IIS logs, and there is certainly no compelling reason to reinvent the wheel here – its a […]

Continue reading