Oracle
 sql >> Base de Dados >  >> RDS >> Oracle

Sintaxe SQL ou restrições de banco de dados?


Excluir AS do alias de tabela - AS pode ser usado com lista de seleção, mas não na cláusula FROM
select a.CREATEDATE, a.BELEGNRRECH, a.MNR, a.UTNR, a.KTXT, b.ANR
from INFOR.RELFBR a, INFOR.RELXDB b
where (a.SAINT = '90') and (a.MNR = b.MNR) and (b.SAINT = '10')
     and (a.CREATEDATE >= '01.01.2014 00:00:00')
order by a.CREATEDATE

Exemplo:
SQL> select * from t_dummy t;

                      X                                                         
-----------------------                                                         
                 9.0000                                                         

SQL> select * from t_dummy as t;
select * from t_dummy as t
                      *
error in line 1:
ORA-00933: SQL command not properly ended

Documentação:

http://docs.oracle.com/cd /B19306_01/server.102/b14200/statements_10002.htm#i2126863