Re: Insert using select for values

2007-02-02 Thread Jeff Butler
> > -----Original Message- > > *From:* Jeff Butler [mailto: [EMAIL PROTECTED] > > *Sent:* Friday, February 02, 2007 9:23 AM > > *To:* user-java@ibatis.apache.org > > *Subject:* Re: Insert using select for values > > > > > > > > DB2 SQLSTA

RE: Insert using select for values

2007-02-02 Thread Tom Henricksen
om: Jeff Butler [mailto:[EMAIL PROTECTED] Sent: Friday, February 02, 2007 10:26 AM To: user-java@ibatis.apache.org Subject: Re: Insert using select for values Date literals are a real pain. I believe that the default toString() on a Java Date is invalid for DB2. So you'll need to transfo

Re: Insert using select for values

2007-02-02 Thread Nathan Maves
> either. When I hard coded the dates as ' 2007-2-1 3:28:06.0' in the xml > it worked fine. > > > > Thanks, > > Tom > > > > -Original Message- > *From:* Jeff Butler [mailto: [EMAIL PROTECTED] > *Sent:* Friday, February 02, 2007 9:23 AM &

Re: Insert using select for values

2007-02-02 Thread Jeff Butler
27; and that didn't work either. When I hard coded the dates as '2007-2-1 3:28:06.0' in the xml it worked fine. Thanks, Tom -Original Message- *From:* Jeff Butler [mailto:[EMAIL PROTECTED] *Sent:* Friday, February 02, 2007 9:23 AM *To:* user-java@ibatis.apache.org

RE: Insert using select for values

2007-02-02 Thread Tom Henricksen
#x27;t work either. When I hard coded the dates as '2007-2-1 3:28:06.0' in the xml it worked fine. Thanks, Tom -Original Message- From: Jeff Butler [mailto:[EMAIL PROTECTED] Sent: Friday, February 02, 2007 9:23 AM To: user-java@ibatis.apache.org Subject: Re: Insert using

Re: Insert using select for values

2007-02-02 Thread Jeff Butler
DB2 SQLSTATE 42610 means "A parameter marker is not allowed" My guess is that DB2 is complaining about the parameters in the select list (enteredBy, enteredDate, etc.) Try changing to simple substitution ($enteredBy$, $enteredDate$, etc.) Jeff Butler On 2/2/07, Tom Henricksen <[EMAIL PROTECT

Insert using select for values

2007-02-02 Thread Tom Henricksen
We are using Insert with select to populate the values. We are using the select for most of the values but there are a few that we try to pass in. The variables seem to be the problem. We are using iBatis(2.1.5). We also use p6spy (captures all SQL to log) and when we take the SQL insert and ru