I have an MIS system where I have to run 15 queries and update 15 sheets which takes a lot of time as I need to make changes in the dates present in the queries, say 3 date variables in each query which have to be updated to the current date.
I understand that creating dynamic SP can solve my problem but I need some guidance on them.
Can any of you suggest on my problem?
Your question is not as clear as it could be but could it be that you are actually referring to creating a Stored Procedure with Parameters as opposed to the use of dynamic Sql?
If its the former, then some pseudo code follows:
Create Procedure [ProcedureName]
SELECT FROM TABLE WHERE [ColumnName]=@Parameter