Replace and Render has been retired by Adaptavist
Another technique similar to How to generate choice values using SQL
Here is an example inspired by the folks at iontrading.com! The Adaptavist Replace and Render is very handy for rendering macros for use in other macros.
See How to generate choice values using SQL for a more complete discussion of this topic.
- Use a script or SQL to create the selection string needed by the run macro
- Wrap that inside the replace-item macro so that it gets evaluated and becomes a replacement value that can be used in the replace-body macro
Always get this part working first before dynamically putting it in the run macro so it is easier to get syntax exactly right!
- Construct the run macro you want with the selections using the substitution variable
select top 785':''',ccc,''':''',ccc,'''' from (
select distinct component as ccc from releases where
select distinct component as ccc from installs where expdate >= getdate()
) as c order by ccc asc