Sql Formatter
http://www.dpriver.com/pp/sqlformat.htm or SQL Pretty Printer
-------------old sql------------------------
SELECT * FROM xla_ae_headers xah WHERE xah.application_id = 222
AND xah.entity_id IN ( SELECT xte.entity_id FROM xla.xla_transaction_entities xte WHERE xte.application_id = 222 AND xte.entity_code = 'TRANSACTIONS'
AND xte.source_id_int_1 = 27008)
-------------old sql------------------------
---------------------------new sql-------------------------------------
---------------------------new sql-------------------------------------