Canfield, Joel scribeva in 2005-11-21 23:42: > select d.document_number, p.permissions, > [here's the tricky part] > (either u.fullname or g.fullname, > depending on whether p.object_type is 'g' or 'u') > from (lotsa joined tables; I can write the joins) I'm just about to call it a day, but this might give you a good starting point: http://www.google.com/search?q=mssql+case+statement hth, .k