retour à propos de votre proposition
Rebonjour,
J'ai changé ma requête en prenant en considération votre proposition dans mon fichier xml concerant ibatis ,j'ai déclaré :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
<sql id="calculMin">
<![CDATA[
select min(v.id_voyage) min
from t_voyage v
]]>
<include refid="whereCommunTable"/>
<![CDATA[
and v.est_prevision=1
and v.est_annule=0
]]>
</sql>
<sql id="calculMax">
<![CDATA[
select max(v.id_voyage) max
from t_voyage v
]]>
<include refid="whereCommunTable"/>
<![CDATA[
and v.est_prevision=1
and v.est_annule=0
]]>)
</sql> |
aussi pour le delete :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
<insert id="deleteVoyageStat" parameterClass="Map" >
<![CDATA[
update t_voyage
set
EST_ANNULE=1,
where est_prevision=1
and est_annule=0
and id_voyage IN
(
select id_voyage
from t_voyage
where est_prevision=1
and id_voyage
between ]]>
<include refid="calculMin"/>
<![CDATA[
and
]]>
<include refid="calculMax"/>
<![CDATA[
order by id_voyage)
and rownum<=$param$
]]>
</insert> |
mais ça marche pas en m'envoyant un message d'erreur :
Code:
1 2
|
com.sncf.fret.swi.service.ServiceException: com.sncf.fret.swi.client.business.DaoException: java.sql.SQLException: Insert statements cannot be executed as a query. |
si vous pouvez m'aider,je vous serai reconnaissant.
Merci d'avance.
Cdt,