Friday, January 7, 2011

Setup Team Foundation Server 2010 with Sharepoint 2007 on Window Server 2008 SP2


Wow what a task!
If you have Office SharePoint 2007 no SP you need to follow these steps:
Next install SQL Server, SharePoint etc... steps:
5Hours later and I am ready to roll!

When creating a new TFS project and setting the SharePoint site up the user must be added to the SharePoint permissions:
  1. Using the TFS Setup account, navigate to http://myserver/sites/DefaultCollection 
  2. Click on Site Actions and select Site settings
  3. Under Users and Permissions, click the link Site collection administrators
  4. Added my account in the domain/account format and clicked ok
Excel Services was unable to load the workbook that you requested:
Give NT AUTHORITY\NETWORK SERVICE  (db owner) on the database named "WSS_Content" 

Tuesday, January 4, 2011

To change the data type of a column without dropping the table (SQL Server 2008):

SQL
ALTER TABLE [dbo].[tbl_001] ALTER COLUMN clm_001 nvarchar(50)

Update data in one table with data from another table

Need to switch 2 columns that were wrongfully imported:

Step1
Create a copy of the tabl
e - CREATE TABLE [dbo].[Client2](....

Step2
Inserted the data to the copied table
-
INSERT INTO [dbo].[Client2]
           ([UniqueClientID]
     ,[Latitude]
           ,[Longitude]
           ,[ClientName])
     SELECT [UniqueClientID]
      ,[Latitude]
      ,[Longitude]
      ,[ClientName]
     FROM [dbo].[Client]

Step3
Switch the 2 column data by updating

UPDATE [dbo].[Client]
   set [Latitude] = [dbo].[Client2].[Longitude]
      ,[Longitude] = [dbo].[Client2].[Latitude]
 From [dbo].[Client],[dbo].[Client2]
 where [dbo].[Client].[UniqueClientID] = [dbo].[Client2].[UniqueClientID]
GO