Oracle? If so, I think it wants you to do to_date(string, fmt) for the
insert. It sometimes gets unhappy if you try to insert dates that aren't the
same format as specified in its NLS params. If not Oracle,
nevermindIhavenoidea. :->

-----Original Message-----
From: Jeff Thies [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 26, 2001 1:02 PM
To: [EMAIL PROTECTED]
Subject: sql error


I'm drawing a blank on an error I'm getting inserting a "date"
(2001070112:00:00) into a varchar field.

Cannot execute: You have an error in your SQL syntax near ':00:00)' at
line 1 

my $sql=q{INSERT INTO some_table(the_date) values(?)};
my $sth=$dbh->prepare($sql);
$sth->execute($the_date) || die "Cannot execute: $DBI::errstr\n";

What could be wrong?

Jeff

Reply via email to