-->
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.  [ 3 posts ] 
Author Message
 Post subject: Want to select list and one column using select query
PostPosted: Tue Apr 26, 2011 9:43 am 
Newbie

Joined: Wed Jan 19, 2011 6:30 am
Posts: 10
HI All,

want to select list and one variable using select query

e.g.
select a.lstObject, b.name from Employee b, custObject a inner join a.lstObject
where b.id=?

getting Exception like
Code:
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near the keyword 'as'.


How do I write this query?

Thanx in advance.
Navnath Kumbhar.


Top
 Profile  
 
 Post subject: Re: Want to select list and one column using select query
PostPosted: Tue Apr 26, 2011 10:04 am 
Regular
Regular

Joined: Fri Jan 28, 2011 11:44 am
Posts: 117
Give an alias to a.lstObject and select this alias!


Top
 Profile  
 
 Post subject: Re: Want to select list and one column using select query
PostPosted: Tue Apr 26, 2011 10:25 am 
Newbie

Joined: Wed Jan 19, 2011 6:30 am
Posts: 10
Hi overmeulen,

it works...... :)

Thanx for your replay.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.