Page 1 of 2 12 LastLast
Results 1 to 15 of 24

Thread: Free Online SQL Formatter

  1. #1
    Join Date
    Jun 2005
    Posts
    24

    Free Online SQL Formatter

    We have just release a free Online SQL Formatter
    which can beautify different sql dialects for you on the fly,
    and translate to other languages such as C#, Java,Delphi with many format options.

    Try it here:
    http://www.wangz.net/gsqlparser/sqlpp/sqlformat.htm

  2. #2
    Join Date
    Feb 2003
    Posts
    1,048
    Nifty, but it doesn't remember the query I entered and if I try more than one way, it reformats the previously reformatted text. I think it would be better to have separate input and output windows.


    Error Messages
    strcopy(1,1) expected token:BEGIN CLOSE DECLARE FETCH GOTO IF OPEN RETURN USE WHILE ALTER CREATE DELETE DROP INSERT SESSION SHARE USER SAVEPOINT
    ") ;
    strcopy(var1, "(4,0) expected token:BEGIN CLOSE DECLARE FETCH GOTO IF OPEN RETURN USE WHILE ALTER CREATE DELETE DROP INSERT SESSION SHARE USER SAVEPOINT
    " ;") ;
    strcopy(var1, "(6,0) expected token:BEGIN CLOSE DECLARE FETCH GOTO IF OPEN RETURN USE WHILE ALTER CREATE DELETE DROP INSERT SESSION SHARE USER SAVEPOINT
    ") ;
    strcopy(var1, "(9,0) expected token:BEGIN CLOSE DECLARE FETCH GOTO IF OPEN RETURN USE WHILE ALTER CREATE DELETE DROP INSERT SESSION SHARE USER SAVEPOINT
    strcat(10,1) expected token:BEGIN CLOSE DECLARE FETCH GOTO IF OPEN RETURN USE WHILE ALTER CREATE DELETE DROP INSERT SESSION SHARE USER SAVEPOINT
    strcopy(12,1) expected token:BEGIN CLOSE DECLARE FETCH GOTO IF OPEN RETURN USE WHILE ALTER CREATE DELETE DROP INSERT SESSION SHARE USER SAVEPOINT
    strcopy(14,1) expected token:BEGIN CLOSE DECLARE FETCH GOTO IF OPEN RETURN USE WHILE ALTER CREATE DELETE DROP INSERT SESSION SHARE USER SAVEPOINT
    strcat(15,1) expected token:BEGIN CLOSE DECLARE FETCH GOTO IF OPEN RETURN USE WHILE ALTER CREATE DELETE DROP INSERT SESSION SHARE USER SAVEPOINT
    strcopy(17,1) expected token:BEGIN CLOSE DECLARE FETCH GOTO IF OPEN RETURN USE WHILE ALTER CREATE DELETE DROP INSERT SESSION SHARE USER SAVEPOINT
    strcat(18,1) expected token:BEGIN CLOSE DECLARE FETCH GOTO IF OPEN RETURN USE WHILE ALTER CREATE DELETE DROP INSERT SESSION SHARE USER SAVEPOINT
    strcopy(20,1) expected token:BEGIN CLOSE DECLARE FETCH GOTO IF OPEN RETURN USE WHILE ALTER CREATE DELETE DROP INSERT SESSION SHARE USER SAVEPOINT
    ") ;
    strcopy(var1, "(23,0) expected token:BEGIN CLOSE DECLARE FETCH GOTO IF OPEN RETURN USE WHILE ALTER CREATE DELETE DROP INSERT SESSION SHARE USER SAVEPOINT
    " ;") ;
    strcopy(var1, "(25,0) expected token:BEGIN CLOSE DECLARE FETCH GOTO IF OPEN RETURN USE WHILE ALTER CREATE DELETE DROP INSERT SESSION SHARE USER SAVEPOINT

    If you have any comments or suggestion about this sql formatter,please contact us.

  3. #3
    Join Date
    Jun 2005
    Posts
    24
    Thanks for your comments.

    I have just added an output window for better use of this sql formatter.

  4. #4
    Join Date
    Feb 2003
    Posts
    1,048
    Cool, that makes it much easier to use!!

    One more slight suggestion. The output for ASP would be the same as it is for VB. So maybe you can make the output in the sleection box say "VB / ASP". If someone wanted to use it for ASP, they may not realize that the format is the same as VB.

  5. #5
    Join Date
    Jun 2005
    Posts
    24
    I have updated this SQL Parser, and It formats SQL statements much better .
    I will improve this parser continuously in the next several weeks.
    anyone like to use this free online SQL Parser may bookmark this url

    http://www.wangz.net/gsqlparser/sqlpp/sqlformat.htm

  6. #6
    Join Date
    Sep 2002
    Location
    Fantasy
    Posts
    4,254

  7. #7
    Join Date
    Jun 2005
    Posts
    24
    Ver2.0 is available. It's 50% faster than ver1 with
    other format parameters.

    http://www.wangz.net/gsqlparser/sqlpp/sqlformat.htm
    --James

  8. #8
    Join Date
    Sep 2005
    Location
    Buffalo NY
    Posts
    5
    I think this works great, I have used it since the original from time to time for quick re-formatting and cleaning up..

    I seem to recall an option to change the text delimiter from doubel quotes to single quotes....which is particular useful if trying to quick-like convert Access SQL to MS SQL

    Great job on that formatter, it is extremely useful!

  9. #9
    Join Date
    Jun 2005
    Posts
    24
    Html output of formatted SQL is supported now, this feature
    is very handy when you post SQL in forum or blogs, have a try:

    http://www.wangz.net/gsqlparser/sqlpp/sqlformat.htm

  10. #10
    Join Date
    Feb 2003
    Posts
    1,048
    Cool, this will come in very handy for the articles I write for other SQL Server sites. I have to submit them in HTMLS format, so it'll be nice to have something automatically output the proper font color tags.

  11. #11
    Join Date
    Jun 2005
    Posts
    24
    There is also a SQL Formatter Plugin for Visual Studio,
    maybe helpful to developers.

    http://www.wangz.net/gsqlparser/sqlpp/sqlformat.htm

  12. #12
    Join Date
    Jun 2005
    Posts
    24
    We have just updated our free online formatter, It's support
    code-colored feature now, have a try here:

    http://www.wangz.net/gsqlparser/sqlpp/sqlformat.htm

  13. #13
    Join Date
    Jun 2005
    Posts
    24
    Free online formatter V2.6 is available now, support Common Table Expressions , CONTAINS/FREETEXT/CONTAINSTABLE/FREETEXTTABLE
    and it's support DB2 Now.

    have a try here:

    http://www.wangz.net/gsqlparser/sqlpp/sqlformat.htm

  14. #14
    Join Date
    Aug 2006
    Posts
    57
    This is very cool! I will definitely use this to fix some very messy sql left behind by contractors

  15. #15
    Join Date
    Jun 2004
    Location
    Germany
    Posts
    26
    There is also another SQL Formatter I published at www.sqlinform.com
    Regards
    GuidoMarcel

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •