HyperSQL Utilities Guide

Edited by

The HSQLB Development Group

Edited by

Blaine Simpson

The HSQL Development Group

Edited by

Fred Toussi

The HSQL Development Group

Copyright 2002-2011 The HSQL Development Group. Permission is granted to distribute this document without any alteration under the terms of the HSQLDB license.

2012-08-06 00:15:58+0100

Table of Contents

Available formats for this document
1. SqlTool
Try It
Purpose, Coverage, Changes in Behavior
Platforms and SqlTool versions covered
Recent Functional Changes
New Features
The Bare Minimum
Quotes and Spaces
Non-displayable Types
Compound commands or commands with semi-colons
Desktop shortcuts
Loading sample data
Satisfying SqlTool's CLASSPATH Requirements
Accessing older HSQLDB Databases with SqlTool
App-specific Classes, Embedding, and non-HyperSQL Databases
Distributing SqlTool with your Apps
SqlTool Client PCs
RC File Authentication Setup
Switching Data Sources
Using Inline RC Authentication
Interactive Usage
SqlTool Command-Line Editing
Command Types
Emulating Non-Interactive mode
Command Types
Special Commands
Edit Buffer / History Commands
Command History
PL Commands
Giving SQL on the Command Line
SQL Files
Piping and shell scripting
Optimally Compatible SQL Files
Special Commands and Edit Buffer Commands in SQL Files
Getting Interactive Functionality with SQL Files
Character Encoding
Generating Text or HTML Reports
Storing and Retrieving Binary Files
SqlTool Procedural Language
Nulls and Empty Strings
SqlTool Functions
PL Sample
Logical Expressions
Mathematical Assignments
Flow Control
PL Example
Raw Mode
Delimiter-Separated-Value Imports and Exports
Simple DSV exports and imports using default settings
Specifying queries and options
CSV Imports and Exports
Unit Testing SqlTool
2. Hsqldb Test Utility
3. Database Manager
Brief Introduction
Auto tree-update
Automatic Connection
RC File
Using the current DatabaseManagers with an older HSQLDB distribution.
DatabaseManagerSwing as an Applet
4. Transfer Tool
Brief Introduction
A. SqlTool System PL Variables
B. HyperSQL File Links

List of Tables

1. Available formats of this document

List of Examples

1.1. Sample RC File
1.2. Piping input into SqlTool
1.3. Redirecting input into SqlTool
1.4. Error-handling Idiom
1.5. Sample HTML Report Generation Script
1.6. Inserting binary data into database from a file
1.7. Downloading binary data from database to a file
1.8. Explicit null and empty-string Tests
1.9. Special values for ?, and _ (or ~) Variables
1.10. Creating a SqlTool Function
1.11. Invoking a SqlTool Function
1.12. Simple SQL file using PL
1.13. Inline If Statement
1.14. SQL File showing use of most PL features
1.15. Interactive Raw Mode example
1.16. PL/SQL Example
1.17. SQL/JRT Example
1.18. SQL/PSM Example
1.19. DSV Export Example
1.20. DSV Import Example
1.21. DSV Export of an Arbitrary Query
1.22. Sample DSV headerswitch settings
1.23. DSV targettable setting
1.24. Sample CSV export + import script

$Revision: 4904 $