Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 36465 invoked from network); 12 Oct 2007 21:59:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Oct 2007 21:59:52 -0000 Received: (qmail 45354 invoked by uid 500); 12 Oct 2007 20:13:00 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 45341 invoked by uid 500); 12 Oct 2007 20:13:00 -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 45330 invoked by uid 99); 12 Oct 2007 20:12:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Oct 2007 13:12:59 -0700 X-ASF-Spam-Status: No, hits=-2.8 required=10.0 tests=RCVD_IN_DNSWL_MED,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: 161.225.129.126 is neither permitted nor denied by domain of Hemant.Kamatgi@target.com) Received: from [161.225.129.126] (HELO smtpout01.target.com) (161.225.129.126) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Oct 2007 20:13:03 +0000 Received: from emailhub11.email.target.com ([10.116.210.35]) by smtpout01.target.com with ESMTP; 12 Oct 2007 14:59:30 -0500 Received: from EMAILMBX10.email.target.com ([10.116.180.156]) by emailhub11.email.target.com ([10.116.210.35]) with mapi; Fri, 12 Oct 2007 15:11:13 -0500 From: Hemant.Kamatgi To: "user-java@ibatis.apache.org" Date: Fri, 12 Oct 2007 15:11:10 -0500 Subject: RE: how tp pass schema name in a query Thread-Topic: how tp pass schema name in a query Thread-Index: AcgM/Se+GUHQUxdUQV2zqHoTRe9mCAADtu7w Message-ID: <07292702F07DB64BB8224048499C7919017FEE62C1@EMAILMBX10.email.target.com> References: <07292702F07DB64BB8224048499C7919017FE30872@EMAILMBX10.email.target.com> <470FBBCC.4000705@googlemail.com> In-Reply-To: <470FBBCC.4000705@googlemail.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org Thanks indeed! -----Original Message----- From: Ole Trenner [mailto:ole.trenner@googlemail.com] Sent: Friday, October 12, 2007 1:24 PM To: user-java@ibatis.apache.org Subject: Re: how tp pass schema name in a query Hemant.Kamatgi wrote: > Is there a way > where I can pass the schema name from out side as a parameter so that we > can maintain only one map file I mean, say for a query , 'select * from > .employee' where is a place holder for a value that can > be configured. In fact there is. In your sqlmap-config.xml you can define a properties file: sqlmapconfig.properties looks like this: schema1=3Dfoo schema2=3Dbar Then you can use named properties everywhere in your sql mappings: Cheers, Ole.