When you create or alter a View, Stored Procedure, Function or Trigger through AQT, a lot of the formatting is lost. This problem happens because the Oracle ODBC Driver removes duplicate spaces from your SQL.
The solution is to use the Microsoft ODBC for Oracle ODBC Driver.