Keeping History Data in SQL Server
Very often there is the need to archive data on daily basis. Just had that question today and here is trimmed down solution based on a recent project. The task is to keep history data on daily basis of changed data only (that is only rows that have changed for the last day). The scenario […]
Cleaning Data with Recursive CTE
SQL Server 2005 added a great new feature: Common Table Expressions (CTE). And even better than that – recursive CTEs. That provides a new powerful tool to solve many SQL problems. One of the areas where recursive CTEs shine is the hierarchical data management. Here is another side of the recursive CTEs – utilizing them […]
Dates and Date Ranges in SQL Server
One of the most common tasks when working with data is to select data for a specific date range or a date. There are two issues that arise: calculating the date range and trimming the time portion in order to select the full days. Below are a few techniques to show how this can be […]
Pivoting data in SQL Server
Very often there is a need to pivot (cross-tab) normalized data for some reporting purposes. While this is best done with reporting tools (Excel is one example with powerful pivoting capabilities), sometimes it needs to be done on the database side. The discussion here is limited to static pivoting (that is when the values to […]
Creating a simple CheckListBox control in WPF
With .NET Framework 3.0 Microsoft has removed one control that I’ve liked and used a lot – the CheckListBox. But on the other hand with WPF the developer can easily create his own check list control. Here is how to create one yourself. Put a simple ListBox in your window: XAML: <Window x:Class=”winCustomPKChooser” xmlns=”http://schemas.microsoft.com/winfx/2006/xaml/presentation” xmlns:x=”http://schemas.microsoft.com/winfx/2006/xaml” […]
How to obfuscate WPF assemblies using obfuscation software for .NET Framework 2.0
I’ve read many posts over the Internet which are stating that it is currently impossible to obfuscate WPF assemblies. Well this is partially true. Here is what you can do to partially protect your .NET Framework 3.0 code:In order your code to continue to work properly you must exclude from the obfuscation at least the […]