ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anson <an...@linkclub-staff.com>
Subject How to use SQL's "IN" with iBatis
Date Thu, 26 Jan 2006 08:36:59 GMT
Dears,

Could any one tell me how to use "IN" with  iBatis?

For example:

case 1:

String key = "01,02,03";

select table.colum1 from table where table.colum2 IN (#key#)

I can not get anything.





case 2:

String key = "01";

select table.colum1 from table where table.colum2 IN (#key#)

I can get the right result.





case 3:
String key = "'01'"

select table.colum1 from table where table.colum2 IN (#key#)

I can not get anything.





How can I get right result with iBatis like this SQL:

select table.colum1 from table where table.colum2 IN ('01', '02', '03');

Best Regards!!





Mime
View raw message