Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 69597 invoked from network); 13 Jul 2008 13:54:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Jul 2008 13:54:38 -0000 Received: (qmail 4760 invoked by uid 500); 13 Jul 2008 13:54:32 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 4744 invoked by uid 500); 13 Jul 2008 13:54:31 -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 4733 invoked by uid 99); 13 Jul 2008 13:54:31 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 13 Jul 2008 06:54:31 -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: local policy) Received: from [206.190.48.187] (HELO web52504.mail.re2.yahoo.com) (206.190.48.187) by apache.org (qpsmtpd/0.29) with SMTP; Sun, 13 Jul 2008 13:53:38 +0000 Received: (qmail 66671 invoked by uid 60001); 13 Jul 2008 13:54:00 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Received:X-Mailer:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type:Message-ID; b=3xkKshuIFjwJAn8MyqlR6SCZtTpThbXAsFCnvDR/k6quM7rS1AsAQ543yVvATzFJ+aho7KATTuhJ94au5ZGMWUgvSWPo0n5VKO1zIiGhX5Z+/vZAjvKDauEaR0j8K6i0y78XA6/4LZulcl6vZdf9sQdMvWx9lV/yubYneV7IVIs=; Received: from [63.118.4.67] by web52504.mail.re2.yahoo.com via HTTP; Sun, 13 Jul 2008 06:54:00 PDT X-Mailer: YahooMailWebService/0.7.199 Date: Sun, 13 Jul 2008 06:54:00 -0700 (PDT) From: kiran vuppla Reply-To: kirankumar_vuppla@yahoo.com Subject: insert statement To: user-java@ibatis.apache.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1190601445-1215957240=:65350" Message-ID: <118314.65350.qm@web52504.mail.re2.yahoo.com> X-Virus-Checked: Checked by ClamAV on apache.org --0-1190601445-1215957240=:65350 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable =A0 Hi, =A0 I am having a insert statement and in which I am trying to insert value= s that I recieve from result. But I see that it is not insertin= g the value. Please let me know if it is correct way to do it? =A0 In the below It is inserting null values for "#date#" which I get from statement. =A0 =A0 select sysdate from dual =A0insert into SessionTbl (name, date, address, city, zip) values (#name#, = #date#, #address#, #city#, #zip#) =A0 Thanks KV=0A=0A=0A --0-1190601445-1215957240=:65350 Content-Type: text/html; charset=us-ascii

 

Hi,

  I am having a insert statement and in which I am trying to insert values that I recieve from <selectKey> result. But I see that it is not inserting the value. Please let me know if it is correct way to do it?

 

In the below It is inserting null values for "#date#" which I get from <selectKey> statement.

 

<insert id="insertValues" parameterClass="Session">

<selectKey resultClass="java.sql.Date" type="pre"  keyProperty="date">

  select sysdate from dual

</selectKey>

 insert into SessionTbl (name, date, address, city, zip) values (#name#, #date#, #address#, #city#, #zip#)

</insert>

 

Thanks

KV


--0-1190601445-1215957240=:65350--