Hi,

There is a boolean option preserveWhitespace; maybe it works. I read the 
source code here 
http://code.google.com/p/h2database/source/browse/trunk/h2/src/main/org/h2/tools/Csv.java

Regards,

-Nicolas

Le samedi 7 décembre 2013 18:57:02 UTC+1, Johann Petrak a écrit :
>
> I want to use CSVREAD to read in a tab-separated values file, but the way 
> I do it, leading spaces seem to get trimmed from the fields that are read. 
>
> I am using something like 
> INSERT ... SELECT ...
>  CSVREAD('test.tsv', UPPER(STRINGDECODE('field1\tfield2\tfield3')),
>          STRINGDECODE('charset=UTF-8 fieldSeparator=\t escape= 
> fieldDelimiter='))
>
> But when the TSV file contains two different lines like this:
>
> val1\tval2\tval3
> val1\t    val2\tval3
>
> they will both be read in into rows like for the first of these lines (no 
> leading spaces in the second field). 
>
> How does this happen and how can I prevent it?
> Is there anything else to be aware of so that the field values are read 
> and preserved absolutely identically to what is in the TSV file?
>

-- 
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