facebook

left join problem

  1. MyEclipse Archived
  2.  > 
  3. Database Tools (DB Explorer, Hibernate, etc.)
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #311611 Reply

    skato
    Member

    Hi i got this error…

    =>15:18:53,500 ERROR [STDERR] Caused by: org.hibernate.hql.ast.QuerySyntaxException: unexpected token: on near line 1, column 341 [select h from Asignatura h where h.codigoAsignatura in (select t.grupoAsignaturaId.codigoAsignatura from GrupoAsignatura t where t.grupoAsignaturaId.codigoAsignatura in (SELECT v.codigoAsignatura FROM AsignaturaAula a left join Asignatura v on a.asignaturaAulaId.codigoAsignatura = v.codigoAsignatura where a.asignaturaAulaId.codigoAsignatura is NULL and v.escuelaDepartamento.codigoUnidadEscuela =6140 and v.estadoAsignatura.codigo = ‘1’) and t.grupoAsignaturaId.periodo = ‘1’ and t.grupoAsignaturaId.ano = ‘2010’)]

    i have -many to one relation ‘codigoAsignatura’ from asignaturaAula to Asignatura

    so i want to rewrite the Subquery like this:

    SELECT v.codigoAsignatura
    FROM AsignaturaAula a
    join Asignatura v
    left outer join a.asignaturaAulaId.codigoAsignatura
    where a.asignaturaAulaId.codigoAsignatura is NULL
    and v.escuelaDepartamento.codigoUnidadEscuela =6140
    and v.estadoAsignatura.codigo = ‘1’

    But no works, can u help me?
    THX

    #311652 Reply

    skato,
    I would recommend you to cross post to appropriate forums.
    Sorry that we cannot help you any further

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: left join problem

You must be logged in to post in the forum log in