MSSQL Stored Procedure with Sub Query



If Else statement in MS SQL Stored Procedure
Sub Query Example in stored procedure

More info http://howtodomssqlcsharpexcelaccess.blogspot.ca/2013/03/mssql-how-to-add-sub-query-to-stored.html