in reply to Re: Re: DBI and TIMESTAMP
in thread DBI and TIMESTAMP
By looking at the date format and syntax, my quess is you are using Oracle. I have found problems using the Oracle default date format with comparisons. What I tend to do in DBI code is set the date format with an alter session, usually right after the connect,
my $dbh = DBI->connect(); $dbh->do('alter session set nls_date_format = 'YYYYMMDD');
This sets the date format for the whole session. Then you can do compares with an easier format, select id from foo where date < 20001201; ..This also makes it easy to format a data file which may be read in for updates or comparisons to a db.
STH
In Section
Seekers of Perl Wisdom