Hi,

Yes, there is an option "lineComment". Set it to "#" and the commented
lines will be ignored. See the docs for details.

    CSVREAD('test.csv', 'ID|NAME|LEVEL', 'charset=UTF-8 fieldSeparator=|
lineComment=#')

Regards,
Thomas


On Saturday, February 18, 2012, h2 wrote:

> Hi
>
> I have a csv file in the format
> #Comment1
> #Comment2
> #Comment3
> ID,NAME,LEVEL
> 1,JOHN,3
> 2,MIKE,4
> .............
> .............
>
> One way of reading this might be to specify the columns in csvread as
>  CSVREAD('test.csv', 'ID|NAME|LEVEL', 'charset=UTF-8
> fieldSeparator=|')
>
> and use a 'where' clause when reading the result set to ignore the
> comments row and column names row. Is there a better way to achieve
> this?
>
> Thank You.
>
> --
> You received this message because you are subscribed to the Google Groups
> "H2 Database" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/h2-database?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to