SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Site Related Forums
 Article Discussion
 Article: Free online SQL Formatter
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

AskSQLTeam
Ask SQLTeam Question

USA
0 Posts

Posted - 04/12/2006 :  09:27:04  Show Profile  Visit AskSQLTeam's Homepage  Reply with Quote
James submitted "This free online SQL Formatter is a tool that helps you beautify sql code,make it readable.
it is designed to deal with SQL statement used by different
database Such as MSSQL,Oracle,MySQL and so on."

Article Link.

Kristen
Test

United Kingdom
22403 Posts

Posted - 04/12/2006 :  11:54:13  Show Profile  Reply with Quote
Can it indent with TABs instead of spaces?

And it would be great if it could remove all comments and coalesce multiple whitespace into single whitespace. (This is to obfuscate our code that we put on client's servers)

Kristen
Go to Top of Page

spirit1
Cybernetic Yak Master

Slovenia
11750 Posts

Posted - 04/12/2006 :  12:25:31  Show Profile  Visit spirit1's Homepage  Reply with Quote
Kristen also check this out if you haven't yet:
http://weblogs.sqlteam.com/mladenp/archive/2006/04/08/9556.aspx

Go with the flow & have fun! Else fight the flow
Blog thingie: http://weblogs.sqlteam.com/mladenp
Go to Top of Page

Kristen
Test

United Kingdom
22403 Posts

Posted - 04/12/2006 :  12:46:28  Show Profile  Reply with Quote
Thanks Spirit. Didn't know that such a tool existing - although it needs a bit more work (key words in comments are colour-highlighted and so on)

Now ... if it could put in Snitz Forum Code [COLOURS], instead of CSS ones, that would be useful!

Kristen
Go to Top of Page

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

USA
7020 Posts

Posted - 04/12/2006 :  15:31:29  Show Profile  Reply with Quote
quote:
Originally posted by Kristen

Can it indent with TABs instead of spaces?

And it would be great if it could remove all comments and coalesce multiple whitespace into single whitespace. (This is to obfuscate our code that we put on client's servers)

Kristen



Why stop there?

How about a tool that obfuscates everything: tables, datatypes, etc.

Yes, we provide full source code to all customers!

create table [CF3FD482055342B3CB065F9E67EFD7]
(
[157323D8E4274C78B6C0C9540964AFB0] [AF717E408DF249589CB1FA4BE7832242] not null
	identity(1,1) primary key clustered,
[C424122303304E69BCD5D048A98D3EF9]  [DA1649CEBA3847E1B81E7208D6C90D32]  not null,
[29E61E9F25FE447E992E7E44EBB05F4A]  [C5207A4CD1FC4641A4BFB1837B7FE9C0]  not null
) on [913AA0AC44D845EFA1519DF2E4296386]


CODO ERGO SUM
Go to Top of Page

rockmoose
SQL Natt Alfen

Sweden
3279 Posts

Posted - 04/12/2006 :  16:33:23  Show Profile  Reply with Quote
I take pride in writing code that needs not be obfuscated any further....

rockmoose
Go to Top of Page

eyechart
Flowing Fount of Yak Knowledge

USA
3575 Posts

Posted - 04/12/2006 :  16:57:18  Show Profile  Reply with Quote
another sql formatter here: http://www.sqlinform.com/sqlformatter_v2.phtml




-ec
Go to Top of Page

Kristen
Test

United Kingdom
22403 Posts

Posted - 04/13/2006 :  01:49:43  Show Profile  Reply with Quote
"I take pride in writing code that needs not be obfuscated any further...."

Ah! Write-only code, eh Rocky?!

"How about a tool that obfuscates everything: tables, datatypes, etc."

We provide databases for web applications that are hosted on public-facing servers. I have no wish to help unscrupulous competitors hack into our code! I also have no wish to make it difficult for the customers to query etc. the database. But the logic in the SProcs is our intellectual property and customers only have rights to the source code under the terms of escrow etc. We encrypt them, but unencrypting them is so trivial that I would like to remove all comments as an additional barrier to the unscrupulous. I'd also be interested to know if it makes a performance difference - reducing use of syscomments may reduce "bandwidth" on retrieval within SQL Server, which may shave off a few precious milliseconds!

Kristen
Go to Top of Page

Kristen
Test

United Kingdom
22403 Posts

Posted - 04/13/2006 :  02:01:45  Show Profile  Reply with Quote
"another sql formatter here"

Thanks ec, pretty handy, and has comment remover / available as API. Damn! More work - might have to build it into my release process!

Kristen
Go to Top of Page

madhivanan
Premature Yak Congratulator

India
22754 Posts

Posted - 04/13/2006 :  05:40:14  Show Profile  Send madhivanan a Yahoo! Message  Reply with Quote
quote:
Originally posted by spirit1

Kristen also check this out if you haven't yet:
http://weblogs.sqlteam.com/mladenp/archive/2006/04/08/9556.aspx

Go with the flow & have fun! Else fight the flow
Blog thingie: http://weblogs.sqlteam.com/mladenp



Thats really nice

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

damaha
Starting Member

4 Posts

Posted - 04/13/2006 :  10:39:05  Show Profile  Visit damaha's Homepage  Reply with Quote
There is a sqlformatter web service on www.gudusoft.com,
it can be consumed by other application on internet,beautify
sql and convert to html code , useful in forum and blogs

here is the demo:
http://www.gudusoft.com/sqlformatter.aspx


www.sqlparser.com
Go to Top of Page

damaha
Starting Member

4 Posts

Posted - 05/10/2006 :  04:25:02  Show Profile  Visit damaha's Homepage  Reply with Quote
There is also a SQL Formatter plugin for visual studio.
http://www.wangz.net/sqlpp.php


www.sqlparser.com

Edited by - damaha on 05/10/2006 11:00:20
Go to Top of Page

deviprasad
Starting Member

India
5 Posts

Posted - 12/28/2011 :  09:05:30  Show Profile  Reply with Quote
you can use this online tool to easyly beautify and format your SQL Script.
http://sqlserverlearner.com/online-tools/tsql-code-formatter
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.08 seconds. Powered By: Snitz Forums 2000