MULLER Miklos wrote:
> Hello DBI Users,
>
> I'm using DBI with the following modules installed:
>
> DBI-1.21
> DBD-CSV-0.2002
> Text-CSV_XS-0.23
> SQL-Statement-1.004
> File-Spec-0.82
>
> The following code snipplet illustrates my problem
> when i want to update a field with a zero length
> string.
>
> I'm not an SQL guru at all, so sorry if it's something
> trivial. If i do an "UPDATE test SET f1='' WHERE f3='baz'"
DBD-CSV has no notion of an empty string. Use NULL instead
"UPDATE test SET f1=NULL WHERE f3='baz'"
And then test for it with IS NULL and IS NOT NULL, not with =''
> instead i see garbage in the database.
That looks like a bug, thanks for spotting it, I'll fix it in the next
release.
--
Jeff