February 13th, 2014

SQL Server: Updating A Column With Random Lookup Values

This article explains how to update a table column with random values from another (lookup) table in SQL Server.

For example, Country table has two columns CountryID, CountryName and UserInfo table has CountryID column. We will update UserInfo table with random CountryIDs from Country table.

January 13th, 2013

Database Change Notifications in ASP.NET using SignalR and SqlDependency

This article shows how to display real time sql server database change notification in ASP.NET using SignalR and SqlDependency object which represents a query notification dependency between an application and an instance of SQL Server. Consider your database is updated or synchronized by windows service in background, you have to display real time updated data. This article explains how to implement it.

February 26th, 2012

How To Use SQL IN Statement to Select Data Having All Specified Values

Generally, We use SQL Where .. IN Statement to determine whether a specified value matches ANY value in a sub-query or a list. But sometimes we require to get data which have ALL specified values, not ANY value. In this post, we’ll see how to accomplish it. Let’s take an example, Consider following data in Orders table