Hallo everyone, 

I have a problem with my query, can someone help me further
This is the query that I want to use in ibatis.

select * from ACCOUNT where NUMBER in
(select NUMBER from ACCOUNT where substr(ACCOUNT,5,4) between '2002' and '2006’)


This is my source:


try {
dao.ACCOUNTDAO accountList2Dao = 
(dao.ACCOUNTDAO)DaoManagerRequester.getDaoManager().getDao(dao.ACCOUNTDAO.class);
model.ACCOUNTExample account2Example = new model.accountExample();    
     
List resultList6 = accountList2Dao.selectByAccountList2(account2Example);
account2Example.createCriteria().andNumberDateBetween(startdate, enddate);
          
List resultList6 = accountList2Dao.selectByAccountList2(account2Example);       
...

} catch ...


This works, and it gives me this:

select * from ACCOUNT where substr(ACCOUNT,5,4) between '2002' and '2006'


Any suggestions?
 

Regards,
Sophia



Reply via email to