Add attributes to a CI relationships' report

Add attributes to a CI relationships' report

Hello,

I am doing the following query to get a report that show me all the relationships of a CI, but I need to add some information and I don't know how to do it:
  1. how can I add columns of differents attributes of the main CI?
  2. how can I filter just to get the the relationship of certains "relationship rules"?
select.ci.ciname as 'Nombre',(select rel.RELATIONSHIP+' '+ci2.CINAME+CHAR(10) from cirelationships as cirel left join ci as ci2 on ci2.ciid=cirel.cii2 left join relationshiptype as rel on rel.relationshiptypeid=cirel.relationshiptypeid where cirel.ciid=ci.ciid for xml path('')) as 'Relaciones' from ci left join CIType cit on ci.citypeid=ci.typeid where ciid in (select ciid from cirelationships) and typename like '%IT Solucion%'
Thanks!

                  New to ADSelfService Plus?