Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 50117 invoked from network); 16 Oct 2007 15:08:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 16 Oct 2007 15:08:32 -0000 Received: (qmail 83557 invoked by uid 500); 16 Oct 2007 15:08:18 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 83331 invoked by uid 500); 16 Oct 2007 15:08:17 -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 83320 invoked by uid 99); 16 Oct 2007 15:08:17 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Oct 2007 08:08:17 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [208.44.121.252] (HELO investoranalytics.com) (208.44.121.252) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Oct 2007 15:08:21 +0000 Received: from [10.1.1.11] (HELO [10.1.1.11]) by investoranalytics.com (CommuniGate Pro SMTP 4.3.7) with ESMTP id 3127481 for user-java@ibatis.apache.org; Tue, 16 Oct 2007 11:04:51 -0400 Message-ID: <4714D314.2000200@investoranalytics.com> Date: Tue, 16 Oct 2007 11:04:52 -0400 From: Lisa Jenkins User-Agent: Thunderbird 1.5.0.4 (Macintosh/20060516) MIME-Version: 1.0 To: user-java@ibatis.apache.org Subject: Re: How to achieve Dynamic SQL query in delete statement References: <13235168.post@talk.nabble.com> In-Reply-To: <13235168.post@talk.nabble.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org I think you've listed your own solution. The hanging may be a db issue, meaning the time it takes for the query to execute/number of rows it takes to process. How long does it take the query to run outside of iBatis (when running directly on the db)? Navanee wrote: > Hi > > Is there a way to pass dynamic Query values to delete statement. like below > > > $value$ > > > In my case, I need to delete some ten tables, But I want to have only one > delete sql map statement like above instead of having ten different SQL > statement, > > I'll pass the $value$ as below for all tables, > > String dynamicQuery = "DELETE FROM TABLE1 WHERE NAME = 'TEST'"; > sqlMapper.delete("trimTable",dynamicQuery); > > I wrote a sample code to achive the above, but during execution the code > hangs and does not come out of it, when there is a valid data to delete, But > finishes it execution where there is no data in the table. > > What might cause the above issue, is there any workaround/solution for > this... > > Could someone please share/provide solution on this? > > Thanks and Regards, > Navanee >