Hi,I'm using the syntax in the documentation, as mentioned: this is at 
http://www.h2database.com/html/functions.html.Under the section headed 
'CSVREAD" it states:

"Instead of a file, an URL may be used, for example 
jar:file:///c:/temp/example.zip!/org/example/nested.csv. To read a stream 
from the classpath, use the prefix classpath:. To read from HTTP, use the 
prefix http: (as in a browser)."

It then gives the following examples: 

CALL CSVREAD('test.csv');
-- Read a file containing the columns ID, NAME with
CALL CSVREAD('test2.csv', 'ID|NAME', 'charset=UTF-8 fieldSeparator=|');
SELECT * FROM CSVREAD('data/test.csv', null, 'rowSeparator=;');
-- Read a tab-separated file
SELECT * FROM CSVREAD('data/test.tsv', null, 'rowSeparator=' || CHAR(9));
SELECT "Last Name" FROM CSVREAD('address.csv');
SELECT "Last Name" FROM CSVREAD('classpath:/org/acme/data/address.csv');

I think this is quite recent. I am using H2 version 1.4.195 and I believe 
the classpath: protocol was introduced in version 1.3

On Thursday, December 7, 2017 at 12:21:56 AM UTC-6, Noel Grandin wrote:
>
> Sorry, CSVREAD does not support URL's or anything smarter than a normal 
> file path.​
>

-- 
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 https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Reply via email to