j.miner (4/10/2013)
Hi Kalpit,A quick solution is below.
John, I copied your syntax to my reply and only after posting I realised - it's wrong.
Parameters in stored procedures do not require brackets:
CREATE Procedure abc_SessionValuesUpdate @a int AS
Not to mention - there might be no parameters, like in the initial post.
Apart from that your solution does not consider following cases:
CREATE Procedure abc_SessionValuesUpdate @a int AS
CREATE
Procedure
abc_SessionValuesUpdate @a int AS
CREATE Procedure
--- some comment
abc_SessionValuesUpdate @a int AS
CREATE Procedure dbo.[abc_SessionValuesUpdate] @a int AS
CREATE PROC dbo.[abc_SessionValuesUpdate] @a int AS
and many-many more.
_____________
Code for TallyGenerator