Thursday, May 10, 2012

Join in Update query - sql server

Simple join in update query is as follows,
 
 UPDATE T1 SET T1.Name = T2.Name
 FROM TableName T1
 JOIN TableName T2
 ON T1.Id = T2.Id
 WHERE T1.Name IS NOT NULL

Monday, May 7, 2012

Rename project in TFS along with containing folder.

If you rename any project in TFS, it doesn't change the project containing folder inside TFS. Fix for this issue: 1) Goto source control. 2) Click 'Rename' in folder properties. 3) Give new name. 3) open the solution in visual studio. it doesn't load the renamed project. Remove the current project by clicking 'Remove' in project properties. 4) Add the renamed project by clicking 'Add Existing Item'. 4) Check-in the solution.