Could not load file or assembly ‘Newtonsoft.Json, Version=6.0.0.0, or one of its dependencies. The system cannot find the file specified.

Could not load file or assembly ‘Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed’ or one of its dependencies. The system cannot find the file specified. I got this error when I added to WEB API to ASP.NET MVC project. So This is how I get it solved Run this command in package manager console Update-Package –reinstall Newtonsoft.Json  

MERGE in Sql Server

From Sql server 2012 we can merge two tables. We can map data from one table to another table. If record exists can do a update and if not insert operation can be done. Syntax Create two tables and Insert some records Then do Merge Now view TargetTable Data  

Sub Query in Sql

What is subquery? Subquery is  just a query inside of a query. Why Subquery? Break down complex logic Simplify reading Subqueries can be replaced by joins. But some times Joins can be complex. Other thing is we are not allowed to put aggregates in WHERE. But we can put it aggreagates inside subquery . Where to Use? We can put sub queries in  three main places in query. SELECT FROM WHERE Using in SELECT Access informations from tables  withing select query Query must return a single(scalar) value Creates a dynamic table. Useful for  breaking down queries. Query must be aliased. Note : I have used Adventureworks 2012 database for following queries  Using with FROM With WHERE Useful for comparing values from other tables Predicates used with subqueries IN Confirm column value exist in subquery Similar to inner join EXISTS Returns true if subquery returns value Used with correlated queries Correlated subquery Pass outer query column into subquery ALL Compares column

read more Sub Query in Sql