Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
cipher
Starting Member
10 Posts |
Posted - 2007-09-20 : 10:03:26
|
| we have a lot of TSQL stored procedure code that we are helping a client update. Unfortunately, we don't have copies of their original scritps and are having to pull this logic directly from the database. The problem is that these procs have no formatting and the TSQL is coming out as long strings, making it hard to debug and time-consuming to properly format.Is there any tool out their that will automatcally format the TSQL code for you?For example, given the following...create procedure myProc @par1 bit AS if par1 = 1 begin return 'True' else return 'False' endWe would like something closer to...create procedure myProc @par1 bit AS if par1 = 1 begin return 'True' else return 'False' end |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-09-20 : 10:09:46
|
| Try www.sqlinform.comMadhivananFailing to plan is Planning to fail |
 |
|
|
jimf
Master Smack Fu Yak Hacker
2875 Posts |
Posted - 2007-09-20 : 10:10:00
|
| Have you tried right-clicking the sproc in SMS and choosing either "Modify" or "Script Procedure As". That will give you a nice format, unless the original script was just plain ugly.Jim |
 |
|
|
cipher
Starting Member
10 Posts |
Posted - 2007-09-20 : 21:28:17
|
| madhivanan, thank you very much. |
 |
|
|
deviprasad
Starting Member
5 Posts |
Posted - 2011-12-28 : 07:38:08
|
| you can use the following link: [url]http://sqlserverlearner.com/online-tools/tsql-code-formatter[/url]Thanks,Devi PrasadLearn SQL Server |
 |
|
|
jeffw8713
Aged Yak Warrior
819 Posts |
Posted - 2011-12-28 : 13:58:34
|
| I use SQL Assistant from SoftTree Technology (http://www.softtreetech.com/). The formatting is fully customizable to your format - however, the utility is not free.Jeff |
 |
|
|
|
|
|