I know how to expand columns dynamically BUT, how might I do this ONLY for certain columns.
I am merging 2 tables and only want to add certain columns from the second table. The columns I want all start with Doc. I may added new columns starting with “Doc” so that the query will add all columns starting with “Doc” dynamically (because I may add more in the future).
Feel sure it’s doable… but haven’t succeeded. All help appreciated. Would be a ‘nice to have’.
You are welcome. I am glad that I can help and that you found solution.
If you also need reverse syntax (in some situation) and you have situation that you want exclude column that not end with some string you can add like example (and not End with 7):