I am attempting to call 3 stored procedures from within a stored procedure.
We'll call them SP_Master, SP_Step1, SP_Step2, SP_Step3
Each individual SP works ( SP_Step1, SP_Step2, SP_Step3)
and will all run in succession in one line in the query anylizer using the word "GO" between each.
When i run them using SP_Master, the query optimizer tries to make an execution plan that puts them out of order. I need them to run sequentially 1-2-3, because 1 does things to the tables that 2 needs to be done, before 3 can happen.
I'm thinking this has somthing to do with the execution plan.
My question is, is it possible to force the execution plan to NOT optimize a query, or does anyone know a way to get my SP to work in sequence. Brandon W
We'll call them SP_Master, SP_Step1, SP_Step2, SP_Step3
Each individual SP works ( SP_Step1, SP_Step2, SP_Step3)
and will all run in succession in one line in the query anylizer using the word "GO" between each.
When i run them using SP_Master, the query optimizer tries to make an execution plan that puts them out of order. I need them to run sequentially 1-2-3, because 1 does things to the tables that 2 needs to be done, before 3 can happen.
I'm thinking this has somthing to do with the execution plan.
My question is, is it possible to force the execution plan to NOT optimize a query, or does anyone know a way to get my SP to work in sequence. Brandon W