Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

IBatis Invalid Column message  for a select

Posted on 2007-08-10
3
Medium Priority
?
1,425 Views
Last Modified: 2013-11-13
Hi Experts,
I am facing a tricky problem, Please help me.
I am trying to select an oracle table column which is defined as  No      
USER_RELEASE      NUMBER(2, 0)
and this is a nullable column. my select is like select nvl(user_release,0) from table.
Trying to select using a result map to a java bean. In the bean the attribute userRelease is defined as int.
I tried double and BigDecimal also. For some reason it is giving me invalid column name. It appears like it is not able to assign the value to the java bean attribute. Can any one point me in the right direction ? I am kind of lost here. Here is my result map entry looks like
<result property="userRelease"    column="user_release"/>
Really appreciate all your help.
Thanks

0
Comment
Question by:json123
  • 2
3 Comments
 
LVL 16

Accepted Solution

by:
suprapto45 earned 2000 total points
ID: 19676236
Try to change your select from
"select nvl(user_release,0) from table"
into
"select nvl(user_release,0) as user_release from table"

David
0
 

Author Comment

by:json123
ID: 19677903
Thank you so much, that works perfect.

0
 
LVL 16

Expert Comment

by:suprapto45
ID: 19678169
Glad I could help.

David
0

Featured Post

NEW Veeam Backup for Microsoft Office 365 1.5

With Office 365, it’s your data and your responsibility to protect it. NEW Veeam Backup for Microsoft Office 365 eliminates the risk of losing access to your Office 365 data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn different types of Android Layout and some basics of an Android App.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
The viewer will learn how to implement Singleton Design Pattern in Java.
Simple Linear Regression
Suggested Courses

578 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question