Category SQL

Using SQL Service 2008 Service Broker for Integration Project Using C# .NET – Step by Step “Hello World” Guide

We had to create a service broker notification service for our integration project a few months back. It was quite hard to find something that actually has an end to end solution to showcase the capability of service broker. So, months after the project, I decided to create a mini Hello World level tutorial to […]

Aggregate multiple values in a column into one column using SQL

Data: A     banana A     apple A     guava B      banana B      apple A      pear To aggregate multiple column into one column, we can use the new(ish) with() statement: The resulting value for this statements is: B     apple,banana A     apple,banana,guava,pear

Fixing “The path XXX is already mapped in workspace YYY.” Error When Mapping RedGate SQL Source Control To TFS Folder

I got this error when I had the server head folder (TFSServer\DefaultCollection) mapped to C:\ in Visual Studio and then tried to map RedGate SQL Source Control. I think this error is thrown because RedGate SQL Source Control was trying to create different workspace in C:\ folder. 1. Remove mapping from the head folder (TFSServer\DefaultCollection) […]

Concatenate String in SQL

To concatenate string to a variable: To concatenate string in your sql statement:

Search for A Text/String In Any Stored Procedures using SQL Server

It’s really easy to find table dependencies using SQL Server Management Studio but there is really no “search for procedure text” in SQL Server.  We recently had to search for this kind of ‘dependencies’ since some of the stored procedures that we have had the table’s value hard coded in the stored proc (bad programmer! […]