feature suggestion
fatherjack2
Posts: 311
Hi,
I don't know how many other developers work but the way I produce scripts involves adding Raiserror lines in my TSQL that report progress to me while I am developing/debugging. Once I am happy with the script these lines get commented out so that they are still there for future development/debugging etc.
It would be awesome if there was a command that we could use to comment/uncomment lines through the whole script that end with a given suffix.
eg
I might have a line like this whilst developing:
RAISERROR ('Just updated xyz table',0,0,1) WITH NOWAIT;
once this script is working i would alter the above line to be:
--DEBUG LINE: RAISERROR ('Just updated xyz table',0,0,1) WITH NOWAIT;
I cant use find/replace to switch between the two.
If i could write this:
RAISERROR ('Just updated xyz table',0,0,1) WITH NOWAIT; --/*#*/
and SQL Prompt would add and remove the "--DEBUG LINE: " for lines where it finds --/*#*/ then it would allow me to turn them all on and off at will.
This may or may not be useful to other developers - I may just be a freak!
cheers
Jonathan
I don't know how many other developers work but the way I produce scripts involves adding Raiserror lines in my TSQL that report progress to me while I am developing/debugging. Once I am happy with the script these lines get commented out so that they are still there for future development/debugging etc.
It would be awesome if there was a command that we could use to comment/uncomment lines through the whole script that end with a given suffix.
eg
I might have a line like this whilst developing:
RAISERROR ('Just updated xyz table',0,0,1) WITH NOWAIT;
once this script is working i would alter the above line to be:
--DEBUG LINE: RAISERROR ('Just updated xyz table',0,0,1) WITH NOWAIT;
I cant use find/replace to switch between the two.
If i could write this:
RAISERROR ('Just updated xyz table',0,0,1) WITH NOWAIT; --/*#*/
and SQL Prompt would add and remove the "--DEBUG LINE: " for lines where it finds --/*#*/ then it would allow me to turn them all on and off at will.
This may or may not be useful to other developers - I may just be a freak!
cheers
Jonathan
Senior DBA
Careers South West Ltd
Comments
For your reference the feature tracking code is: SP-1592