Stacy Mader wrote:

> the book states that "No date or time typews are directly supported".
> 
> Would this imply that if I have a CSV file with the following format:
> 
> DateTime,MaxWSpd
> 01-JUN-1996 12:23:40,80
> 
> I cannot execute SQL commands like:
> 
> select to_char(date_occurred, 'DD-MON-YYYY HH24:MI:SS') from database
> WHERE
> MaxWSpd = 80 ????

Yes, that's true. Also because the DBD::CSV driver has no concept of
to_char which is not a SQL function, but depends on the different
database engines (from your sintax, I suppose you come from Oracle or
PostgreSQL).

If you enter '01-JUN-1996 12:23:40' in your date_occured field, it will
be stored *as text*. This may be good for your application, because when
you run

select date_occured from database where MaxWSpd = 80

you have the expected behaviour.

What you really cannot do is to use the to_char patterns to change
display mode, or perform operation between dates. To be more clear,
things like 

select date_occured from database where date_occured > '01-MAY-1998'

are completely unworkable in DBD::CSV unless you save dates in a
suitable manner.

HIH

-- 
Alessio F. Bragadini            [EMAIL PROTECTED]
APL Financial Services          http://village.albourne.com
Nicosia, Cyprus                 phone: +357-2-755750

"It is more complicated than you think"
                -- The Eighth Networking Truth from RFC 1925

Reply via email to