with data as ( select templateId, templateTitle, templateDescription, dbo.fseToken( templateId ) templateTk from tbl_eml_templates where ownerid = and ownertype = ) #forJSON( 'data', attributes.dataStore, 'templateTitle' )#