0 votes
in Rock by TinaStephens (8.6k points)
edited

My client is changing the way users request childcare. I need to find every active registration that asks the question "Do you need childcare?" How would I do this?

1 Answer

0 votes
by TinaStephens (8.6k points)
edited
 
Best answer

You'll need to run this SQL in the SQL command: (will return a list of every registration instance that asks a question that includes 'childcare').

SELECT rt.Id as RegistrationTemplateId
        ,'Registration Template' as [Resource]
        ,rt.[Name] as [Name]
        ,'/page/403?RegistrationTemplateId=' + cast(rt.Id as varchar(10)) as Link
        , a.Id as AttributeId, a.Name as Attribute, a.[Key] as AttributeKey
    FROM RegistrationTemplate rt
        left join Attribute a on rt.Id = a.EntitytypeQualifierValue and a.EntityTypeQualifierColumn = 'RegistrationTemplateId'
 
        left join attributevalue av on a.id = av.attributeid and av.entityid = rt.id
    WHERE a.[Name] like '%childcare%'
order by rt.Id


SQL contributed by Marissa Eubanks the great.
Welcome! Here you can ask questions and receive answers (hopefully) from other members of our team.
...