sql - how to join two table in jpa createquery? -
i want join 2 tables have got error . used syntaxe :
query qrec2=em.createquery("select o ofplanifie o operateur w o.idope =: w.idope");
but got error :
caused by: exception [eclipselink-8025] (eclipse persistence services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.jpqlexception exception description: syntax error parsing query [select o ofplanifie o operateur w o.idope =: w.idope], line 1, column 27: unexpected token [operateur]. internal exception: noviablealtexception(80@[()* loopback of 477:9: (node= join )*])
how can join 2 tables ?
you missing comma between 2 tables ofplanifie o, operateur w
additionally, if want select columns ofplanifie
, have select o.*
instead of select o
Comments
Post a Comment