select cats.attrID, cats.attrDescription AS CategoryName, cats.lockFlag, link.mstr_attrID AS sectnid from tbl_ORG_Attributes cats, tbl_ORG_AttributeLinks link where cats.OwnerID = and cats.FSL_TableCode = and cats.attrTypeID = 26 and cats.attrID = link.child_attrID and link.child_attrTypeID = 26 and link.mstr_attrTypeID = 25 and link.mstr_attrID = order by cats.attrDescription