this is not a good way of storing values in tables. Have you heard about normalisation and first normal form? By storing like you're really making manipulations difficult and costlyAnyways, if you want to live with this you can use a logic like below and its rather dirty!SELECT p.Val AS DirNames,q.Val AS READACCESS,r.Val AS WRITEACCESS,s.Val AS FULLACCESSFROM(SELECT f.ID,f.ValFROM table tCROSS APPLY dbo.ParseValues(t.DirNames,',')f)pINNER JOIN(SELECT f.ID,f.ValFROM table tCROSS APPLY dbo.ParseValues(t.READACCESS,' ')f)qON q.ID = p.IDINNERJOIN(SELECT f.ID,f.ValFROM table tCROSS APPLY dbo.ParseValues(t.WRITEACCESS,' ')f)rON r.ID = q.IDINNER JOIN(SELECT f.ID,f.ValFROM table tCROSS APPLY dbo.ParseValues(t.FULLACCESS,' ')f)sON s.ID = r.ID
ParseValues can be found in below linkhttp://visakhm.blogspot.com/2010/02/parsing-delimited-string.html------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/