-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: undefined token :on (left outer join)
PostPosted: Sat Jul 16, 2011 12:59 am 
Newbie

Joined: Sat Jul 16, 2011 12:52 am
Posts: 3
i am using left outer join in hibernate (Native sql query)

Select * from emp e left outer join dept d on e.deptno = d.deptno


I got exception Undefined token ON

How to resolve this problem..


Top
 Profile  
 
 Post subject: Re: undefined token :on (left outer join)
PostPosted: Sat Jul 16, 2011 3:37 am 
Newbie

Joined: Thu Apr 21, 2011 8:59 am
Posts: 14
Not sure if you are trying to execute SQL or HQL.
If its HQL, I do not think you can use "ON", instead you can specify "WHERE" there.
If its SQL, you will have to provide the table names instead of saying "emp e"

_________________
Lokesh, C
( SCBCD 5, CCENT, SCJP 5 )


Top
 Profile  
 
 Post subject: Re: undefined token :on (left outer join)
PostPosted: Sat Jul 16, 2011 6:46 am 
Newbie

Joined: Sat Jul 16, 2011 12:52 am
Posts: 3
Thanking you for reply me,

I tried to change instead of ON to where
at this time i got another exceptions...
i.e path expected for join and unexpected end of sub tree


Top
 Profile  
 
 Post subject: Re: undefined token :on (left outer join)
PostPosted: Mon Jul 18, 2011 3:10 am 
Newbie

Joined: Sat Jul 16, 2011 12:52 am
Posts: 3
Please give solution for this issue...


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.