Hi, Im having so many trouble to pass from sql to hql.
The query is
select distinct E.CODIGO_ENTIDAD CODIGO_UDAF, e.razon_social NOMBRE_UDAF, e.nemonico_entidad NEMONICO_UDAF, E.RUC_ENTIDAD RUC_UDAF from Entidad e LEFT JOIN Relacion_Entidad a ON e.codigo_Entidad=a.entidad_A AND a.codigo_Tipo_relacion=33 LEFT JOIN ( select substr(nemonico_Entidad,0,length(nemonico_Entidad)-4) Nemonico from Entidad where nemonico_Entidad not like '%0000' ) T ON substr(e.nemonico_Entidad,0,length(e.nemonico_Entidad)-4) = Nemonico where e.nemonico_Entidad like '%0000' and length(e.nemonico_Entidad)>5
I've got a problem (path expected for join). when I try to do the HQL
select distinct E.CODIGO_ENTIDAD CODIGO_UDAF, e.razon_social NOMBRE_UDAF, e.nemonico_entidad NEMONICO_UDAF, E.RUC_ENTIDAD RUC_UDAF from Entidad e LEFT JOIN Relacion_Entidad a LEFT JOIN ( select substring(nemonico_Entidad,0,length(nemonico_Entidad)-4) Nemonico from Entidad where nemonico_Entidad not like '%0000' ) T where e.codigo_Entidad=a.entidad_A AND a.codigo_Tipo_relacion=33 and substring(e.nemonico_Entidad,0,length(e.nemonico_Entidad)-4) = Nemonico and e.nemonico_Entidad like '%0000' and length(e.nemonico_Entidad)>5
Hope someone can help me.
Thanks in advance!
|