XSQL is especially efficient for data processing. In fact, it can even be used as an ETL tool, given the features it incorporates to facilitate transparent access to multiple databases.
 

1 DDL

 

1.1 Table

@ in Temporary Tables

Before creating a temporary table, we recommend users verify that it does not already exist in the database. To avoid overlapping temporary tables, @ is the recommended prefix placed before table names. This character is replaced, during execution time, by a suffix which guarantees the uniqueness of the table name.

Prefijo tmp_ en temporales

The prefix tmp_ is recommended for temporary tables in order to differentiate them from static tables.

 

1.2 Index

Creates an index in the specified table.

<index
    name='name'
    table='table'
    columns='columns'
    oracle='yes|no'
/>
Example
Copy
<index name='@i_tmp_gadjudic1' table='@tmp_gadjudic' columns='codpri, fecha, cabres' />
 

1.3 Drop

This tag is used to remove tables from the database in which the statement is executed. It is composed of the following attributes:

<drop
    table='table'
    temp='y|n'
    onexception='ignore'
/>
Example
Copy
<drop table='galmacen' />
Example
Copy
<drop table='@tmpalt_alm' temp='y' onexception='ignore' />
<table name='@tmpalt_alm' temp='yes'>
    <column name='almalt' type='char' size='12' required='y' />
    <column name='cuealt' type='char' size='4' required='y' />
    <column name='priori' type='decimal' size='12' required='y' />
</table>
Example
Copy
<drop table='@tmp_display_aux' onexception='ignore'/>
<select intotemp='@tmp_display_aux'>
    <columns>
        a.codart, a.varlog, a.coduni, a.numlot,
        a.codean, <p_fecini /> fecmov
    </columns>
    <from table='@tmp_display' alias='a' />
    <where>
        a.fecmov BETWEEN <m_fecini /> AND <eval-date d='-1'><p_fecini /></eval-date>
    </where>
</select>