In a prior project I used DBI by itself. I ended up writing a single routine to handle writing any generalized data into my tables. Part of the routine handling oracle SQL generation for dates looked like this:
I imagine you'll need to do something similar.# Note that date data must consist of a date encased in # single quotes followed by a comma, then a date # format string encased in single quotes. For example: # '2002-05-30','YYYY-MM-DD' # or '05/30/2000:18:31','MM/DD/YYYY:HH:MM' foreach $name ( keys (%$r_datedata) ) { $column_str .= $name . ", "; if ( $$r_datedata{$name} eq "SYSDATE" ) { $value_str .= "SYSDATE, "; } else { $value_str .= "to_date(" . $$r_datedata{$name} . "), "; } }
-------------------------------------
Nothing is too wonderful to be true
-- Michael Faraday
In reply to Re: Class::DBI Oracle Dates
by freddo411
in thread Class::DBI Oracle Dates
by set_uk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |