I am not to sure on how to create a XML file for each record.I think it will be much more feasible to do it with any application language.The below query will create a new column with xml values in it.declare @t table(Number int,Name varchar(30),Surname varchar(30),Type varchar(20),OperationType varchar(20))insert @tselect 31234,'Joe','Bloggs','SC','Update' union select 31235,'Joe1','Bloggs1','ST','Insert'select * from @tselect Number,convert(xml,(select Type as 'Card/@Type',Number as 'Card/@Number',OperationType as 'Card/@OperationType',Name,Surname from @t t1 where t1.Number=t2.Number for xml path(''),root('Card')))XmlCol from @t t2 PBUH