Hi Jonathan, > I would like to be able to initially populate a relational HSQLDB > database using a CSV file.
additionally to the spreadsheet-based solution already suggested: HSQLDB has a feature of embedding CSV files as if they were native HSQL tables, which currently works only if you did not embed the HSQLDB into an OOo .odb file: You could - create a HSQLDB which is not embedded (if you not already have one) with - database type: JDBC - driver class: org.hsqldb.jdbcDriver - url: jdbc:hsqldb:file:c:\temp\foo - copy your .csv files to c:\temp (beside the foo.* files automatically generated by HSQLDB) - link those csv files with two manual SQL statements (Tools|SQL), as described in http://hsqldb.sourceforge.net/doc/guide/ch05.html Basically, it's a CREATE TEXT TABLE <name> <table_structure> SET TABLE <name> SOURCE <csv_file_name> >From then on, your CSV files appear in the HSQLDB, including the capabilities to query them. If you want to import them into another DB (e.g. a embedded HSQLDB), you can do so by simple drag and drop. Side note: There's yet another solution: create a new database (File/New/Database) of type Text, and point it to your csv files. Then, simply drag'n'drop or copy'n'paste the tables from this new database to the one where you want them to be imported. Ciao Frank -- - Frank Sch�nheit, Software Engineer [EMAIL PROTECTED] - - Sun Microsystems http://www.sun.com/staroffice - - OpenOffice.org Database http://dba.openoffice.org - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
