ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xianwinwin <xianwin...@gmail.com>
Subject what is the correct SQL for IN ?
Date Mon, 16 Apr 2007 21:25:39 GMT

Hi there,

I wonder how to implement this query in ibatis as it gives me an error
message.

query: ..... AND LG.state IN ('ny', 'bj')   (in plain sql) 

in ibatis: 

	  <isNotNull prepend="AND" property="state">
	  	LG.state IN #state:VARCHAR#
	  </isNotNull>


error:  You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near
''(\'ny\', \'nj\')' 	   	

the state value is: "('ny', 'nj')" 

thanks 
-- 
View this message in context: http://www.nabble.com/what-is-the-correct-SQL-for-IN---tf3587326.html#a10024994
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


Mime
View raw message