在網路上找了找,有個方便的工具:Instant SQL Formatter
線上格式化SQL工具,還蠻方便的,但並不支援UNICODE,所以出現非英文語時就會出現「???」,還真的是麻煩...
中文亂碼的畫面 |
有提供 Desktop version, Add-In for SSMS, Add-In for VS or API
API就是利用網路連結到Instant SQL Formatter來處理。所以重點還是在前三項
因為我不只是用MS SQL,所以下載了Desktop Version來測試,以下就是展示畫面:
未格式化時的SQL |
格式化後的SQL |
更棒的是,這個版本就支援UNICODE了!
工作上經常會先將 T-SQL 測到沒有問題後,再謄到 Delphi 中,此時會進行字串相加的串連工作,然而這工作如果文字少還算簡單,如果量大時,難免會出現漏打的情形,這時 SQL Pretty Printer 也支援 SQL 指令碼轉成其它如 C#、Pascal 相容的字串相加程式碼:
SQL Pretty Printer 有將 SQL 組成其它語言字串相加的功能 |
價格
SQL Pretty Printer 是付費軟體,一個LICENSE $50,但為你省下的時間絕對超過 $50 的價值!
向你推薦!
而作者也提供了免費申請的服務:GET SQL PRETTY PRINTER DESKTOP VERSION FOR FREE
原文是這麼寫的:
GET SQL PRETTY PRINTER DESKTOP VERSION FOR FREE
To get a free license key, you can do one of the following:
- If you are a technical/software blogger or journalist willing to write us up (honest reviews are the most useful to us) email us a short blurb with the link to your blog and we'll send you a license, FREE of charge, so that you can evaluate sql pretty printer properly.
- If you are willing to demo SQL Pretty Printer to an audience of at least 15 people (at a user group, a conference, a BarCamp), email us your info and we'll give you two licenses, one for you to keep and one to give away at the event, FREE of charge.
- If you teach a high-school class, email us the name of your school and your class, plus the number of students in your class. We will send you a license for all of them.
- A note to university students and professors: we currently do not offer free licenses to universities, but we'll be happy to offer you an additional 50% off any orders of 10 or more licenses. Let us know if you're interested and we'll set up a discount code for you.
If you don't fit in any of the four buckets above, you can buy a single-user license of SQL Pretty Printer for Desktop for $50.
IMPORTANT: due to the large volume of requests we have been receiving lately, we cannot promise we'll answer every email. We try our best, but please be understanding if you don't hear back from us.
幸運的是我有屬於我自己的Blog,準備來去申請囉! :D
有更新的消息會再補充! ^ ^
20110909 補充
想不到作者真的有回覆,超有效率的
感謝作者送了Desktop Version license.
立即來測了一下
咦!原來還有Debug功能 |
也期待這套軟體能越作越好囉~~~~! (大樂)
沒有留言:
張貼留言