Hi adnan,
While compiling your code i am getting the errors like below.
Msg 102, Level 15, State 1, Line 2
Incorrect syntax near '?'.
Msg 102, Level 15, State 1, Line 10
Incorrect syntax near '?'.
Msg 102, Level 15, State 1, Line 31
Incorrect syntax near 'ScheduleCount'.
Msg 102, Level 15, State 1, Line 32
Incorrect syntax near 'StepCount'.
Msg 102, Level 15, State 1, Line 64
Incorrect syntax near '?'.
please advise me to modify this.