like this ?create table #name( rec_id int, Name1 varchar(10), Name2 varchar(10), Name3 varchar(10))insert into #name (rec_id, Name1) select 1, 'one'insert into #name (rec_id, Name1, Name2) select 2, 'two', 'two-Two'insert into #name (rec_id, Name1, Name2, Name3) select 3, 'three', 'three-3', 'three-4'insert into #name (rec_id, Name1, Name3) select 4, 'four', 'four-4'select rec_id, Name1from #namewhere Name1 is not nullunion allselect rec_id, Name2from #namewhere Name2 is not nullunion allselect rec_id, Name3from #namewhere Name3 is not nullorder by rec_id
-----------------[KH]