Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Re: Re: DBI and TIMESTAMP

by sth (Priest)
on Feb 03, 2003 at 19:04 UTC ( #232359=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://232359]
help
Chatterbox?
[Corion]: This is vaguely inspired by that list of "nasty" strings, which I'd like to replace among HTTP parameters, just to see whether the application crashes, but also for easy downloading of a list of URLs etc
[Corion]: Maybe I'll just conoct something using Algorithm::Permute to create an (OO) generator for such requests, or a simple function.
[Corion]: For testing I imagine one would want to test a random sampling of such "bad"/"unexpected" requests, while for downloading, one would want to generate them all in order, but not necessarily as a huge list
[Corion]: s/Algorithm:: Permute/Algorithm ::Loops/

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (7)
As of 2017-01-16 15:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (151 votes). Check out past polls.