I would like to suggest this very useful implementation and can be obtained from the site www.sqlparser.com
Source code is also available (http://www.sqlparser.com/dlaction.p...e=SQL%20Formatter%20with%20source%20code).
Thanks for listening.