Hello Colin, Thanks for your advice. We were able to write the SQL below, based on your table suggestions and we are very close to meeting our target except it is doing a cross join and giving us too many rows. Please could you suggest the best join for this type of query? What I am looking for are the values for all the metadata for a given category e.g. Landlord Services. “Select dt.Name,dt.DataID,dt.VersionNum,DA.ID,DA.DefID,CM.AttrName,CM.CatName,CM.CatID,DA.ValDate,DA.ValStr,DA.ValIntfrom OTCS.DTreedt right outerjoin OTCS.LLAttrDataDA on dt.DataID= DA.IDright outerjoin OTCS.CatRegionMapCM on DA.DefID= CM.CatIDwhere CM.CatNamelike 'Landlord S%'and DA.ID= 1131133” Your help is greatly appreciated. Thank youJaz---------------------------------Jaswinder DaviesI.T. System AdministratorBusiness Services GroupEaling CouncilPerceval House3rd Floor -Mulberry Area14-16 Uxbridge RoadEaling, LondonW5 2HLTel: 0208 825 8635 mailto: DaviesJa@ealing.gov.uk Disclaimer: This email and any attachments to it are intended solely for the person to whom it is addressed. It may contain confidential or sensitive material and should be handled accordingly.If you have received this email or any of the information in it in error, or if you are not the intended recipient, you must not disclose, distribute, copy or print any of it, and all copies must be deleted from your system. Please notify the sender immediately.Whilst we take reasonable steps to identify software viruses, any attachments to this email may contain viruses which our anti-virus software has failed to identify. No liability is accepted for such viruses, and we therefore recommend that you carry out yourown anti-virus checks before opening any attachments. Information contained in this e-mail may be subject to public disclosure under the Freedom of Information Act 2000 or the Environmental Information Regulations 2004. **********************************************************************
Please consider the environment before printing this email.
The content of this email and any attachment transmitted within are
confidential and may be privileged. If you are not the intended recipient
and have received this email in error, please notify the sender and delete
this message along with any attachments immediately. Unauthorised usage,
disclosure, copying or forwarding of this email, its content and/or
any attachments is strictly forbidden.
This footnote also confirms that this email message has been swept by
Mimecast for the presence of computer viruses.
www.mimecast.com
**********************************************************************