XPLAIN2SQL(1)

NAME
xplain2sql - convert Xplain statements to many SQL dialects

SYNOPSIS
xplain2sql -h

xplain2sql [options] myfile.ddl

xplain2sql [options] myfile.ddl > myfile.sql

DESCRIPTION
xplain2sql can convert Xplain data definition and data manipulation and retrieval statements to many SQL dialects. Output is written to stdout.

EXIT STATUS
xplain2sql exits with 0 when the translation was successful, with 1 otherwise.

GENERAL OPTIONS

-h  List all options.

SQL DIALECT OPTIONS

-ansi
    Translate to ANSI-92 SQL.

-basic
    Translate to a very basic common subset of ANSI-92 SQL.

-db2
    Translate to the latest supported DB2 SQL dialect.

-db26
    Translate to the DB2 version 6 dialect.

-db271
    Translate to the DB2 version 7.1 dialect.

-foxpro
    Translate to FoxPro SQL.

-interbase
    Translate to the latest InterBase SQL dialect.

-interbase4
    Translate to the InterBase 4.0 SQL dialect.

-interbase6
    Translate to the InterBase 6.0 SQL dialect.

-msaccess97
    Translate to Microsoft Access '97 SQL.

-msaccess
    Translate to the latest supported Microsoft Access SQL.

-msaccess2000
    Translate to the Microsoft Access 2000 SQL.

-msql
    Translate to mini SQL.

-mygsql
    Translate to the latest supported MySQL dialect.

-mygsql322
    Translate to MySQL 3.22.

-mygsql4
    Translate to MySQL 4.0 ANSI mode.

-oracle
    Translate to the latest supported Oracle dialect.

-oracle901
    Translate to Oracle 9.0.1 SQL.

-pgsql
    Translate to the latest supported PostgreSQL dialect.

-pgsql7
    Translate to the PostgreSQL 7.0 dialect.

-pgsql72
    Translate to the PostgreSQL 7.2 dialect.

-pgsql73
    Translate to the PostgreSQL 7.3 dialect.

-tsql
    Translate to the latest supported Transact SQL (Microsoft SQL Server) dialect.

-tsql65
    Translate to Microsoft SQL Server 6.5 dialect.

-tsql70
    Translate to Microsoft SQL Server 7.0 dialect.

SQL GENERATION OPTIONS

-noauto
    Do not generate auto-generated primary keys.

-noassert
    Do not generate code to support asserts.

-nodatabase
    Do not generate code for the database command.

-noextendindex
    Do not create an index on the primary key of the temporary table created for an extend.

-nosp
    Do not create insert, update and delete stored procedures.

-nospprefix
    Do not prefix stored procedure names with 'sp_'. Stored procedures with this prefix have a supposed performance disadvantage with Microsoft SQL Server.

-timestamp
    Generate a timestamp column in each table, if the choosen SQL dialect supports this.

XML OUTPUT OPTIONS

-xml
    Write an XML description to xplain2sql.xml of the emitted SQL.

BUGS
Not all Xplain statements are supported for all SQL dialects. See the manual which database supports which statement and why.

WEB SITE
Go to http://www.pobox.com/~berend/xplain2sql/ (http://www.pobox.com/~berend/xplain2sql/) for more documentation and support.

AUTHOR
Berend de Boer <berend@pobox.com>