CRM 2011: Locate workflows triggered by a specific field

Today I was trying to track down which workflows were fired on modification of a specific field. This info is all stored in the WORKFLOW table in the SQL DB, so the following SQL Scrap was enough to locate the offending workflow.

declare @FieldNamePartial as varchar(250)
select @FieldNamePartial = '<FIELDNAME>'

SELECT Workflow.ActiveWorkflowIdName AS WorkFlowOnField, Workflow.TriggerOnUpdateAttributeList AS TriggeredByField, EntityLogicalView.Name as EntityName
FROM Workflow LEFT OUTER JOIN
EntityLogicalView ON Workflow.PrimaryEntity = EntityLogicalView.ObjectTypeCode
WHERE (Workflow.TriggerOnUpdateAttributeList LIKE '%' + @FieldNamePartial + '%')

Just replace the <FIELDNAME> with part of the field you are looking to find.

As with any code you find on the internet - use at your own risk.