On Apr 9, 4:30 pm, "[email protected]"
<[email protected]> wrote:
> For instance, if I want to test my sql statement from the H2 GUI front-
> end before doing via my JDBC java code.
>
> I tried to pass the path , i.e. INSERT INTO mytable (id,name,file)
> VALUES(1,'file.xml',/my/local/path/file.xml);
> but this fails.
>
> Within the code (java for instance), it's easy to create a File object
> and pass that in, but directly from a sql script, I'm stuck...

If you can change your SQL tool, you may want to have a look at SQL
Workbench/J.

It extends regular SQL to support the following syntax

INSERT INTO mytable (id,name,file)
VALUES(1,'file.xml', {$blobfile='/my/local/path/file.xml'} );

http://www.sql-workbench.net/manual/using.html#blob-support

It can be downloaded from here: http://www.sql-workbench.net/downloads.html

@Thomas Mueller: I hope you don't mind that I mention my tool here. As
you have listed it on your homepage, I assumed this is OK

Regards
Thomas

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