﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
1084	"Oracle database does not support ""as"" for aliasing table names in from cluase"	pashazadeh		"In Oracle database '''as''' can only be used for column aliasing, and table aliasing must be done without '''as'''.

So in Oracle you can not write:
{{{
select a.* from t1 as a
}}}
and must write
{{{
select a.* from t1 a
}}}

In HibenateDocumentDAO class there are some queries which aliases table names with '''as''' keyword, and it results SQLGrammerExceptions.

for example following query:

{{{
select distinct(B.ld_tag) 
  from ld_tag as B, ld_document as C
 where B.ld_tenantid= :tenantId
   and C.ld_id=B.ld_docid
   and C.ld_deleted=0 
UNION 
select distinct(D.ld_tag)
  from ld_foldertag as D, ld_folder as E
 where D.ld_tenantid = :tenantId 
   and E.ld_id=D.ld_folderid 
   and E.ld_deleted=0
}}]

there are multiple queries with this problem in this class.
 
"	bug	closed	trivial	8.6.1	Core	8.6	fixed	Invalid Oracle QUery	
