• Would it be possible to have a little more info.

    You have two tables;

    ResourceGroupBase = ResourceGroupId (the GUID and unique reference to this table) and some details about the ResourceGroupBase

    ConstraintBasedGroupBase = ConstraintBasedGroupId (according to your sql this is the same as the ResourceGroupBase but I would have thought it would be the unique reference for this table)

    I understand you want the Group each team is in but I don't understand where this information is in the tables.

    I assume the xml given is an example out of one column in one of the tables (the ConstraintBasedGroupBase?).

    Could you give us the schema's for the tables and a couple of examples from the relevant fields.

    Thanks,

    Peter