I am investigating a single stored procedure that is returning odd results. It dynamically builds sql and uses views and functions. It is difficult to follow what the final sql query applied to the database actually is from the code.
Can I use SQL Server Profiler to see the final query text?
If so, what are the steps? And how do I restrict the Profiler to monitor only a single specific stored procedure?