Thanks for all your help I made some modifications and am trying to display the table in the following format:City State DataSvrs BackupSvrsChicago IL Svr1,Svr2 Svr3,Svr4 Atlanta GA Svr1,Svr2 NULL
Any suggestions?Will I have to create a temp table and do a outer join?*UPDATE*I've made some progress but am still having a slight problem...I am using this query:ALTER VIEW v_USAtlasAuthServersasselect distinct u.City, u.State, CASE u.Type WHEN 'Data' then dbo.fnGetServers(City, State, Type) ELSE null END as Data_Servers,CASE u.Type WHEN 'Backup' then dbo.fnGetServers(City, State, Type) ELSE null END as Backup_Servers from serverops.dbo.v_userviews uwhere u.tree='tree1' and u.country='united states' and u.type in ('Data Server','Backup Server')group by u.city, u.state, u.typewhich gives me the following table:City State Data_Servers Backup_ServersChicago IL Svr1,Svr2 NULL Chicago IL NULL Svr3,Svr4 Atlanta GA Svr1,Svr2 NULL
Which is not right as I want Chicago, IL to be in one row...any idea on how to fix this?