If you just want something very basic, you can just do this (of course)...--datadeclare @t table (id int, name varchar(10))insert @t select 1, 'john'union all select 2, 'doe'--calculationselect 'insert @t (id, name) values (' + cast(id as varchar(10)) + ', ''' + replace(name, '''', '''''') + ''')' from @t(Assuming the answer to the question Srinika asked is that it's in the table you were talking about)Ryan Randallwww.monsoonmalabar.com London-based IT consultancy Solutions are easy. Understanding the problem, now, that's the hard part.