SQL - Query to return Text Components and the Document template(s) they are included in ? Thanks!
the components (their ids at least) of a document template are stored in one text field in the doctemplate table, so a simple SQL is not going to do it for you.
Might be easier to export the document templates as clinical kit and write a little script to parse them out.
select objectid from hierobjs where prtattrid = '60' gets you the identifier that will show up in the TEXT field of the DOCTEMPLATE table. As Peter said, it would be ugly to do a LIKE statement for every text component you have. Some kind of scripting would be best. If you are only looking for a handful, then select * from doctemplate where text like '%1474133134300600%' (using the objectid from the first query for the like number) will find you your document templates where a particular text component is used.