Usage Note 12062: "Warning: CREATE TABLE statement recursively references the target table"
Beginning in SAS 9 of PROC SQL, a warning is written to the SAS log when
creating a table with the same name as any table listed on the FROM
clause.
The '92 ANSI standards for SQL state that recursive table references are
illegal unless the SQL conforms to the "FULL SQL" ANSI standard or the
implementation chooses to allow recursive references to be used. PROC
SQL does not follow the "FULL SQL" ANSI standard. Recursive references,
used in update operations, can return incorrect results.
It is for these reasons recursive references are not supported.
The "recursive reference" warning can be prevented for the CREATE TABLE
statement in SAS 9 by including the UNDO_POLICY=NONE option on the PROC
SQL statement. The use of the UNDO_POLICY=NONE option will only prevent
the warning for SQL queries similar to the following:
proc sql undo_policy=none;
create table one as
select * from one;
quit;
Note: The use of the UNDO_POLICY=NONE option only prevents the warning.
It does not remove the inherent risk possible if recursive table
references are chosen to be used.
The UNDO_POLICY=NONE option will not prevent warnings if recursive references
are being made in UPDATE / INSERT / DELETE operations. Similar to:
proc sql undo_policy=none;
delete from one
where id in (select id from one);
quit;
Operating System and Release Information
SAS System | Base SAS | 64-bit Enabled AIX | 9 TS M0 | |
OpenVMS Alpha | 9 TS M0 | |
64-bit Enabled HP-UX | 9 TS M0 | |
HP-UX IPF | 9 TS M0 | |
HP-UX | 9 TS M0 | |
Linux | 9 TS M0 | |
z/OS | 9 TS M0 | |
64-bit Enabled Solaris | 9 TS M0 | |
Solaris | 9 TS M0 | |
Microsoft Windows 2000 Advanced Server | 9 TS M0 | |
Microsoft Windows 2000 Datacenter Server | 9 TS M0 | |
Microsoft Windows 2000 Professional | 9 TS M0 | |
Microsoft Windows XP Professional | 9 TS M0 | |
Microsoft Windows NT Workstation | 9 TS M0 | |
Microsoft® Windows® for 64-Bit Itanium-based Systems | 9 TS M0 | |
Microsoft Windows Server 2003 Standard Edition | 9 TS M0 | |
Microsoft Windows Server 2003 Enterprise Edition | 9 TS M0 | |
Microsoft Windows Server 2003 Datacenter Edition | 9 TS M0 | |
Microsoft Windows 2000 Server | 9 TS M0 | |
Tru64 UNIX | 9 TS M0 | |
AIX | 9 TS M0 | |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
Type: | Usage Note |
Priority: | medium |
Topic: | SAS Reference ==> Procedures ==> SQL SAS Reference ==> SQL
|
Date Modified: | 2006-05-22 14:20:44 |
Date Created: | 2004-03-26 13:14:51 |