alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

HSQLDB example source code file (load_binding_lu.sql)

This example HSQLDB source code file (load_binding_lu.sql) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - HSQLDB tags/keywords

binding_tmptxt, binding_tmptxt, create, create, creating, into, set, setting, source, source, table, table, temp, text

The HSQLDB load_binding_lu.sql source code

/*
    $Id: load_binding_lu.sql,v 1.1 2004/06/09 13:50:26 unsaved Exp $
    Load BINDING Lookup Text Table
*/

\p Creating table BINDING_TMPTXT
CREATE TEMP TEXT TABLE binding_tmptxt (
    id integer,
    name varchar(12)
);

\p Setting text file source
SET TABLE binding_tmptxt SOURCE "binding_lu.ttbl;ignore_first=true;fs=|";

\p rows in binding_tmptxt:
select count(*) from binding_tmptxt;
\p PRE rows in binding_lu:
select count(*) from binding_lu;

INSERT INTO binding_lu (
    id,
    name
) SELECT
    id,
    name
FROM BINDING_TMPTXT;

commit;

\p POST rows in binding_lu:
select count(*) from binding_lu;

Other HSQLDB examples (source code examples)

Here is a short list of links related to this HSQLDB load_binding_lu.sql source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.