ASA Database Administration Guide
Database Options
Alphabetical list of options
Controls whether queries with duplicate correlation names syntax for multi-table joins are allowed, or reported as an error.
ON, OFF
ON
REWRITE function [Miscellaneous]
If this option is set to ON then Adaptive Server Anywhere allows duplicate correlation names to be used in the null-supplying side of the outer joins. The tables or views specified with the same correlation name are interpreted as the same instance of the table or view.
The following FROM clause illustrates the Adaptive Server Anywhere interpretation of a join using duplicate correlation names:
( R left outer join T on (C1), T join S on ( C2 ) )
where C1 and C2 are search conditions.
If the option is set to ON, this join is interpreted as follows:
( R left outer join T on ( C1 ) ) join S on ( C2 )
If the option is set to OFF, the following error is generated:
ASA Error -137: Table 'T' requires a unique correlation name.
To see the result of eliminating duplicate correlation names, you can view the rewritten statement using the REWRITE function with the second argument set to ANSI.