SQL Script (SQL)

SQL Script (*.SQL) documents are created when you Write SQL in the Data tab. You can then Run the SQL Script to update the data file or server.

The SQL Offline - Getting Started 3 (Create Tables) video shows you how to create and run SQL script.
A complete list of videos can be found here: http://inters.com/videos.

An Offline SQL Script document is formatted to run using client drivers, which execute one line at a time (there are no GO statements).

SELECT statements create an Offline OL document. You can have more than one SELECT statement in the SQL Script.

SQL Script documents displays Unicode (Offline documents display UTF8).

Sample SQL Script: Unicode.sql.txt.

WRITE SQL

An Offline SQL Script document is created when you Write SQL in the Data tab.

The connection string from the data link is copied into the SQL Script document.

If you add a record to an Offline document, an INSERT statement is added to the SQL Script.

Changing a value in the Offline document results in an UPDATE statement.

If you select Delete Unmatched Rows in the Advanced Data Link dialog box and delete a row in the Offline document, a DELETE statement is added.

SQL ADMIN (DDL)

If you add a column to an Offline document, an ALTER statement is used to create the column.

CREATE, ALTER, and DROP statements define the table structure so they are referred to as DDL (Data Definition Language) statements. INSERT, UPDATE, and DELETE are DML (Data Manipulation Language) statements.

If the table does not exist in the data file or server, DDL is included to create the table.


SQL SCRIPT DOCUMENT

SQL QUERIES (SELECT)

An Offline document can be created from a SELECT query. If supported by the data file or server, you can update (Write) into a SELECT.

SELECT queries are not run from Offline SQL documents. Instead, you connect to a data file or server and click New Query in the Source window.


SQL DIALOG BOX

If you enter a SELECT statement into the SQL dialog box a new Offline OL document is created. The statement is saved with the data link.

To execute arbitrary SQL statements click Execute SQL under Admin in the Data tab.


SQL Offline © 2014 Interscape Corporation