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.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Formatting the TSQL code

Author  Topic 

rohitkumar
Constraint Violating Yak Guru

472 Posts

Posted - 2008-07-21 : 10:52:21
Hi All, What tool do you use to format the TSQL code?

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2008-07-21 : 10:54:15
mainly fingers and TAB TAB TAB


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

rohitkumar
Constraint Violating Yak Guru

472 Posts

Posted - 2008-07-21 : 10:55:22
really? thats a lot of work
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-07-21 : 11:03:13
quote:
Originally posted by rohitkumar

really? thats a lot of work


not much if you're used to doing it.
Go to Top of Page

rohitkumar
Constraint Violating Yak Guru

472 Posts

Posted - 2008-07-21 : 11:06:58
What if you get 4000 line badly written procedure from a developer which you have to debug/clean and tune.
Do you still prefer to manually do it?
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-07-21 : 11:15:04
quote:
Originally posted by rohitkumar

What if you get 4000 line badly written procedure from a developer which you have to debug/clean and tune.
Do you still prefer to manually do it?


Thats where you've standards coming into play. we've clearly defined standards followed for coding which will eliminate the chances of such badly written code.
Go to Top of Page

rohitkumar
Constraint Violating Yak Guru

472 Posts

Posted - 2008-07-21 : 11:35:45
difficult company to work with :)
Go to Top of Page

blindman
Master Smack Fu Yak Hacker

2365 Posts

Posted - 2008-07-21 : 12:24:32
I use this when faced with badly formatted code:
http://www.wangz.net/cgi-bin/pp/gsqlparser/sqlpp/sqlformat.tpl
Bookmark it.

e4 d5 xd5 Nf6
Go to Top of Page

rohitkumar
Constraint Violating Yak Guru

472 Posts

Posted - 2008-07-21 : 12:26:08
this is something I was looking for. Thank you.
Go to Top of Page

tosscrosby
Aged Yak Warrior

676 Posts

Posted - 2008-07-21 : 15:20:49
Here's another for fomatting. I haven't been able to checkout the link provided by blindman yet. It's currently blocked by my company rules. I'll check it from home.

http://www.simple-talk.com/prettifier/default.php

Terry
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-07-21 : 15:28:16
We purchased the Red Gate SQL Bundle, which comes with a formatter plus loads of other great tools.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

Lamprey
Master Smack Fu Yak Hacker

4614 Posts

Posted - 2008-07-21 : 15:56:09
http://www.sqlinform.com has a nice formatting tool that is free and comes in a web-based and desktop flavors.
Go to Top of Page

rohitkumar
Constraint Violating Yak Guru

472 Posts

Posted - 2008-07-21 : 16:00:45
quote:
Originally posted by Lamprey

http://www.sqlinform.com has a nice formatting tool that is free and comes in a web-based and desktop flavors.



Loading Java Applet Failed...

must be related to the company firewall, all the interesting sites are blocked :(
Go to Top of Page
   

- Advertisement -