Given two tables:
T1( EntityID int , EmailAddress varchar(55),MaxNumberOfConnections int )
T2( EntityID int , EntityAttributes XML )
How do I insert all the data from T1 into T2 with a single statement in such a way that all the columns in T1 (all but EntityID ) are converted into one XML column in T2 :
T1( 1,'[email protected]',454)
T2(1, '<Attributes>
<Attribute EmailAddress="[email protected]">
<Attribute MaxNumberOfConnections ="454">
</Attributes>' )