Wednesday, December 7, 2011

How To Add new column to existing SQL Server Table

One of my student asked me, he wanted to modify existing SQL Server table by adding new column price (money). Table already has content so he does not want to recreate the table. He tried to use SQL Server Management Studio Table Designer but could not save the modified structure.

Solution : use this select - into query to create new table

Select * , cast(0 as money) as price into dbo.newtable from dbo.oldtable

This query will create new table name dbo.newtable with the structure same as oldtable plus additional new column (price) type money, and populate dbo.newtable from dbo.oldtable content.

Free Microsoft Exam 70-659 TS: Windows Server 2008 R2 Virtualization

My company Ingram Micro Asia Limited, is partnering with Microsoft to offer free exam 70-659 TS: Windows Server 2008 R2 Virtualization

Please visit this link for more detail

Friday, December 2, 2011

Hyper-V Virtual Machine could not be initialized

I am in the middle of setting Microsoft course image on some new machines we rented. The processor was i7. After importing the VMs with recommended procedures, the VMs on new i7 machines cannot be started with the error messages VM could not be initialized.

Solution, we need to tick check box on VM setting :

- Migrate to a physical computer with a different processor version