My guess is that you've not really got the String format for a Date right for your database. It is notoriously difficult to specify a String for a date. You might try to prototype the insert statement in some interactive database client (like squirrel) to get it working before you try the iBATIS stuff.
You probably also need to do a "cast" - use the database function to convert a String to a date. If you were using DB2, it would look like this:
Insert into table
Select
Address,
City,
Zip,
'Fred' as name,
date('yyyynnn') as date
From Table
Where Id = #id#
Select
Address,
City,
Zip,
'Fred' as name,
date('yyyynnn') as date
From Table
Where Id = #id#
Where 'yyyynnn' is a Julian date.
Jeff Butler
On 1/26/06, Bondre, Prathit <[EMAIL PROTECTED]
> wrote:
Hi Jeff,
Thanks for your response.
I tried that as well but when I pass in a String with the database specific format it give me a cast mismatch error.
"Value not compatible with the datatype of its assignment target".
Any ideas?
