How To Get SelectStatement From Procedure?
This is a follow up question from here. I'm trying to use DACExtensions to retrieve the SelectStatement objects from a Procedure so that I can generate wrapper functions from my SS
Solution 1:
Using TSqlModelUtils.TryGetFragmentForAnalysis should ensure you get the original AST inside the model - hopefully that will have what you need. You may want to debug in and view your AST and what actually gets created - that's how we do things internally and often you may be surprised about what actually gets generated. Finally note that the DacpacExplorer tool might make this easier to visualize - it should now have support for showing the AST behind an object such as a procedure.
Post a Comment for "How To Get SelectStatement From Procedure?"