It tries to set the date column to the string "to_date( '03/03/2004', 'MM/DD/YYYY' )" and fails.update tablename set foo = 'bar', date = 'to_date( \'03/03/2004\', \'MM/DD/YYYY\' )' where id = '1'
You'll have to do any date calculations & conversions yourself and pass in the result using whatever format Oracle recognizes (unix epoch? YYYYMMDDHHMMSS format?). Or maybe even use attribute inflation/deflation to make your life a little easier. Just pass in (for instance) a Time::Piece object instead of a date string. There's even an example of this using Time::Piece in Class::DBI's POD.
Bottom line: For safety reasons, anything you set your Class::DBI objects' fields to will never be interperted as SQL. Otherwise, its queries would fail every time you did something involving quotation marks.
blokhead
In reply to Re: Class::DBI / Oracle date field Q
by blokhead
in thread Class::DBI / Oracle date field Q
by freddo411
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |