Page 1 of 1

ORA-00907 LEFT OUTER JOIN

Posted: Wed 01 Dec 2010 22:26
by rick.duarte
I'm trying to execute a left outer join query but I'm getting ORA-00907 error
"ORA-00907: missing right parenthesis".

Here is my LINQ:

Code: Select all

from s in ctx.Semanas
orderby s.DtFimSemana descending
select new Semana
{
    DtInicial = s.DtInicioSemana,
    DtFinal = s.DtFimSemana,
    LogDtEnvio = s.LogDtEnvio,
    LogCdUsuario = s.LogCdUsuario,
    LogNmUsuario = s.Usuario.NmUsuario
};
And here is the generated SQL:

Code: Select all

SELECT 
"Project1".C1 AS C1, 
"Project1".DTINICIOSEMANA AS DTINICIOSEMANA, 
"Project1".DTFIMSEMANA AS DTFIMSEMANA, 
"Project1".LOGDTENVIO AS LOGDTENVIO, 
"Project1".LOGCDUSUARIO AS LOGCDUSUARIO, 
"Project1".NMUSUARIO AS NMUSUARIO
FROM ( SELECT 
	"Extent1".DTINICIOSEMANA AS DTINICIOSEMANA, 
	"Extent1".DTFIMSEMANA AS DTFIMSEMANA, 
	"Extent1".LOGDTENVIO AS LOGDTENVIO, 
	"Extent1".LOGCDUSUARIO AS LOGCDUSUARIO, 
	"Extent2".NMUSUARIO AS NMUSUARIO, 
	1 AS C1
	FROM  SBLOGS.SEMANA "Extent1"
	LEFT OUTER JOIN SBLOGS.USUARIO "Extent2" ON "Extent1".LOGCDUSUARIO = "Extent2".CDUSUARIO
)  "Project1"
ORDER BY "Project1".DTFIMSEMANA DESC
The relationship between the tables is Zero or One to Many.

Can you help me identify where is the error?

Best regards,

Henrique

Oracle 8i

Posted: Wed 01 Dec 2010 23:03
by rick.duarte
I found the problem.
I'm connecting to a Oracle 8i, and it don't accept LEFT OUTER JOIN.

Please, How can I solve this problem?
Is there any property that I can set the Oracle version?
The Entity Framework can generate queries with (+) instead LEFT OUTER JOIN?

Best regards,

Henrique

Posted: Thu 02 Dec 2010 09:37
by AndreyR
We provide Entity Framework support for 9.2.0.4 or higher Oracle versions.
We do not plan to add support for prior versions at the moment.
Sorry for the inconvenience.
Anyway, I recommend you to upgrade to Oracle 9.2.0.4, it contains a number of bug fixes and improvements.

Posted: Thu 02 Dec 2010 12:17
by rick.duarte
Andrey,

I know that upgrade to a new version is the best scenario, but the company don't have plans to upgrade this application.
Is there any other solution for this problem?

Best regards,

Henrique

Posted: Thu 02 Dec 2010 15:24
by AndreyR
You can try using pure ADO.NET code. Devart LinqConnect does not provide support for Oracle server prior to 9.2.0.4 as well.