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.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='@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='galmacen' />
<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' />
<drop table='@tmp_display_aux' onexception='ignore'/>
<select intotemp='@tmp_display_aux'>
        a.codart, a.varlog, a.coduni, a.numlot,
        a.codean, <p_fecini /> fecmov
    <from table='@tmp_display' alias='a' />
        a.fecmov BETWEEN <m_fecini /> AND <eval-date d='-1'><p_fecini /></eval-date>