Considering the following Raw SQL query made in Django 1.5 to an Oracle backend that is actually working
cursor.execute("SELECT EGW.TF_BSC_CELTCHH.BSC FROM EGW.TF_BSC_CELTCHH WHERE ROWNUM <= 5")
But if I try to use an alias for the table name like this:
cursor.execute("SELECT TCHH.BSC FROM EGW.TF_BSC_CELTCHH AS TCHH WHERE ROWNUM <= 5")
I get the following error:
ORA-00933: SQL command not properly ended
Why table aliasing is causing such trouble in Oracle?