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
 Site Related Forums
 Article Discussion
 Article: Free online SQL Formatter

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2006-04-12 : 09:27:04
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

22859 Posts

Posted - 2006-04-12 : 11:54:13
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

11752 Posts

Posted - 2006-04-12 : 12:25:31
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: [URL="http://weblogs.sqlteam.com/mladenp"]
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2006-04-12 : 12:46:28
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)

7020 Posts

Posted - 2006-04-12 : 15:31:29
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

3279 Posts

Posted - 2006-04-12 : 16:33:23
I take pride in writing code that needs not be obfuscated any further....

rockmoose
Go to Top of Page

eyechart
Master Smack Fu Yak Hacker

3575 Posts

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




-ec
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2006-04-13 : 01:49:43
"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

22859 Posts

Posted - 2006-04-13 : 02:01:45
"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

22864 Posts

Posted - 2006-04-13 : 05:40:14
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: [URL="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 - 2006-04-13 : 10:39:05
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 - 2006-05-10 : 04:25:02
There is also a SQL Formatter plugin for visual studio.
http://www.wangz.net/sqlpp.php


www.sqlparser.com
Go to Top of Page

deviprasad
Starting Member

5 Posts

Posted - 2011-12-28 : 09:05:30
you can use this online tool to easyly beautify and format your SQL Script.
[url]http://sqlserverlearner.com/online-tools/tsql-code-formatter[/url]
Go to Top of Page
   

- Advertisement -