Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 38415 invoked from network); 22 Oct 2008 19:39:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 22 Oct 2008 19:39:14 -0000 Received: (qmail 49481 invoked by uid 500); 22 Oct 2008 19:39:13 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 49460 invoked by uid 500); 22 Oct 2008 19:39:13 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 49449 invoked by uid 99); 22 Oct 2008 19:39:13 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Oct 2008 12:39:13 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of yamilbracho@hotmail.com designates 65.54.246.148 as permitted sender) Received: from [65.54.246.148] (HELO bay0-omc2-s12.bay0.hotmail.com) (65.54.246.148) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Oct 2008 19:38:00 +0000 Received: from BAY108-W12 ([65.54.162.112]) by bay0-omc2-s12.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 22 Oct 2008 12:38:17 -0700 Message-ID: Content-Type: multipart/alternative; boundary="_100051fd-6615-4ef4-98b5-f89e2e598e17_" X-Originating-IP: [200.35.141.21] From: Yamil Bracho To: Subject: RE: Problems with Dynamic SQL Date: Wed, 22 Oct 2008 19:38:17 +0000 Importance: Normal In-Reply-To: References: MIME-Version: 1.0 X-OriginalArrivalTime: 22 Oct 2008 19:38:17.0819 (UTC) FILETIME=[BB8212B0:01C9347D] X-Virus-Checked: Checked by ClamAV on apache.org --_100051fd-6615-4ef4-98b5-f89e2e598e17_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Well=2C I change my mapping to=20 And my java code: Map parameters =3D new HashMap()=3B parameters.put("codigoBanco"=2C codigoBanco)=3B String [] rifArray =3D rifList.split("=2C")=3B for (int i=3D0=3B i < rifArray.length=3Bi++) { rifArray[i] =3D "'" + rifArray[i] + "'"=3B } rifList =3D StringUtils.join(rifArray=2C '=2C')=3B parameters.put("rifList"=2C rifList)=3B =20 return getSqlMapClientTemplate().queryForList("SolAfi.findAllByBanc= oRif"=2C parameters)=3B It is no what I want to do but i worked... _________________________________________________________________ Llega la nueva temporada. Consulta las nuevas tendencias en MSN Estilo http://estilo.es.msn.com/moda/= --_100051fd-6615-4ef4-98b5-f89e2e598e17_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Well=2C I change my mapping to

 =3B<=3Bselect id=3D"SolAf= i.findAllByBancoRif"
 =3B =3B =3B =3B =3B =3B&n= bsp=3B =3B =3B =3B =3B parameterClass=3D"java.util.HashMap"=
 =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B resultMap=3D"mapSolAfi">=3B
 =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B =3B SELECT co_afiliacion=2C
 =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B =3B =3B =3B =3B =3B&nb= sp=3B =3B nu_rif=2C
 =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B =3B =3B =3B =3B =3B&nb= sp=3B =3B =3B =3B =3B =3B =3B =3B nb_empresa=2C=
 =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B =3B cce.solicitud_afiliacion.co_sector= =2C
 =3B =3B =3B =3B =3B =3B =3B =3B&nbs= p=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B cce.sector.nb_sector=2C
&nbs= p=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B cce.solicitud_afiliacion.co_banco=2C
&n= bsp=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B cce.banco.nb_banco=2C
 =3B =3B&= nbsp=3B =3B =3B =3B =3B =3B =3B =3B =3B&nbs= p=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B ti_solicitud=2C
 =3B =3B =3B =3B&nbs= p=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B= st_solicitud=2C
 =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B =3B =3B =3B fe_registro=2C
=  =3B =3B =3B =3B =3B =3B =3B =3B =3B&nb= sp=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B co_usuario=2C
 =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B =3B =3B =3B =3B =3B&nb= sp=3B =3B fe_respuesta=2C
 =3B =3B =3B =3B =3B&n= bsp=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B co_func= ionario=2C
 =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B =3B =3B nb_nota
 =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B =3B FROM cce.solicitud_afiliacion=2C cce.banco=2C cce.= sector
 =3B =3B =3B =3B =3B =3B =3B =3B&= nbsp=3B =3B =3B =3B =3B =3B WHERE cce.solicitud_afiliac= ion.co_banco =3D #codigoBanco# AND
 =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B =3B =3B cce.solicitud_afiliacion.c= o_banco =3D cce.banco.co_banco AND
 =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B =3B =3B =3B=  =3B =3B =3B =3B =3B =3B cce.solicitud_afiliacion.c= o_sector =3D cce.sector.co_sector AND
 =3B =3B =3B =3B&n= bsp=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B cce.solicitud_afiliacio= n.nu_rif IN ($rifList$)
 =3B =3B =3B <=3B/select>=3B
=
And my java code:

 =3B =3B =3B Map parameters =3D ne= w HashMap()=3B
 =3B =3B =3B =3B =3B =3B =3B = parameters.put("codigoBanco"=2C codigoBanco)=3B

 =3B =3B&nbs= p=3B =3B =3B =3B =3B String [] rifArray =3D rifList.split("= =2C")=3B
 =3B =3B =3B =3B =3B =3B =3B for (i= nt i=3D0=3B i <=3B rifArray.length=3Bi++) {
 =3B =3B =3B&n= bsp=3B =3B =3B =3B =3B =3B =3B =3B rifArray[i] = =3D "'" + rifArray[i] + "'"=3B
 =3B =3B =3B =3B =3B&= nbsp=3B =3B }
 =3B =3B =3B =3B =3B =3B = =3B rifList =3D StringUtils.join(rifArray=2C '=2C')=3B
 =3B =3B&= nbsp=3B =3B =3B =3B =3B parameters.put("rifList"=2C rifList= )=3B
 =3B =3B =3B =3B =3B =3B =3B
 = =3B =3B =3B =3B =3B =3B =3B return getSqlMapClientT= emplate().queryForList("SolAfi.findAllByBancoRif"=2C parameters)=3B

=
It is no what I want to do but i worked...




La cartera=2C las gafas. =BFte falta algo? Ahora ll=E9vate Messenger en t= u m=F3vil = --_100051fd-6615-4ef4-98b5-f89e2e598e17_--