Hi,

> Maybe it is intended to work this way

Yes, an empty value ("a,,c") is always treated as "null" currently.

> Why bother specifying null=xxx if ,, is read as null anyway?

This feature for compatibility, it is only needed to support reading
existing CSV files that contain explicit "null" delimiters, as in
"1,2,null,4". I don't know why those products use that, I see no point.

Regards,
Thomas





On Thu, Oct 3, 2013 at 11:59 PM, WillyMac <[email protected]> wrote:

> I would expect that the only representation for null would be the one
> specified. Maybe it is intended to work this way, but I find it confusing
> to have two null representations. Why bother specifying null=xxx if ,, is
> read as null anyway?
>
> Or maybe my syntax is wrong?
>
> *Input file:*
>
> c1,c2,c3
> a,,c
> a,"",c
> a,XX_null_XX,c
>
> *SQL:*
>
> select * from
> csvread( 'tst.csv', null, 'null=XX_null_XX' )
>
> *Output (? == null):*
>
> C1                C2                C3
> ----------------- ----------------- -----------------
> a                 ?                 c
> a                                   c
> a                 ?                 c
>
>  --
> You received this message because you are subscribed to the Google Groups
> "H2 Database" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to