Occasionally I need to display status of nodes without all the white space.

Nicely compressed to give maximum amount of information. Perfect for a NOC view.

select
max(column1) as column1,
max(column2) as column2,
max(column3) as column3,
max(column4) as column4
from (
select
linenumber,
case colnumber when 1 then node else NULL end as column1,
case colnumber when 2 then node else NULL end as column2,
case colnumber when 3 then node else NULL end as column3,
case colnumber when 4 then node else NULL end as column4
from (select '<img src="/orion/images/statusicons/Small-'+tmp.StatusLED+'"/>' +'<a href="thwack.solarwinds.com/.../View.aspx as varchar)+'">'+tmp.node+'</>' [Node]
,((rownumber-1) / 4) + 1 as linenumber,((rownumber-1) % 4)+1 as colnumber
from (select n.nodeid, n.statusled, n.Caption as [Node],rownumber = ROW_NUMBER() over (order by n.caption asc) from Nodes n) tmp
) tmp1
group by linenumber, tmp1.colnumber, tmp1.node) tmp2
group by tmp2.linenumber
Thanks
Amit