Category Archives: SQL

Do not run this in production!

Some actions are dangerous for a production environment. How to guarantee that action applied in a test environment only? Here is the example of TSQL script checking if the current database has “_Test” suffix (it could be server name, or variable, … Continue reading

Posted in SQL | Leave a comment

Join Arrays

In SQL we use join day by day. But what if we need to intersect and sort 2D arrays directly in c#? Here is my example how to join person and donut by donut type. Including * for person who likes … Continue reading

Posted in C#, SQL | Leave a comment

OpenProj free project managment example

“OpenProj” is a project management application similar to Microsoft Project. It includes most of the features of Microsoft Project but is free. It could be used : if you need to view a Microsoft Project file and do not have … Continue reading

Posted in PowerShell, SQL | Leave a comment

How to highlight searching words in text

Here is quick example how to highlight searching words using full text search in TSQL. It also avoids highlighting stop words /* Author: Andrew Butenko Create date: 14-01-2015 Description: highlight searching words in text including forms and excluding stop words Example: DECLARE … Continue reading

Posted in SQL | Tagged , | Leave a comment

How to clean text based on ASCII range

Ok, how can I clean my text with simple English symbols, let’s say from CHAR(10) to CHAR(125). In other words, if I have text “‘1,2,3…,4,5,•,6,ÿ,7′”, how can I get “1,2,3,4,5,,6,,7” ? Here is my approach: if text within 64K, it takes less than 1 second. … Continue reading

Posted in SQL | Tagged | Leave a comment

Shoot me if I create that table

I have seen “that” table many times in different systems. It sounds like alien from another planet irresponsible developer creates that table without understanding how many efforts would be spent to maintain that structures. I am talking about organizing date ranges, aka slow changed dimension (SCD). … Continue reading

Posted in SQL, Uncategorized | Tagged , , , | Leave a comment

Data Driven Subscription Standard Edition

Data Driven Subscription (DDS) is SSRS feature available in SQL Server Enterprise Edition only. It allows rendering many copies of the same report based on combination of parameters and deliver them by query defined destinations (emails or file location). DDS checks if report has data and … Continue reading

Posted in SQL, SSIS, SSRS | Tagged | 1 Comment