SAS allows creation of proc sql
create table
statement where the table to be created recursively references itself in the select statement e.g.:
proc sql;
create table t1 as
select
t1.id
,t2.val1
from
t1
inner join t2 on t1.id=t2.id
;
quit;
When a statement like this is executed a warning message is written to the log.
WARNING: This CREATE TABLE statement recursively references the target table. A consequence of this is a possible data integrity problem.
This warning message could be suppressed by using undo_policy=none
option. (see SAS Usage Note 12062)
Question:
Can creating a table in such a recursive manner potentially return some unexpected results? Is it possible that it would create different results that spiting the same operation into 2 steps:
proc sql; create table _data_ as select t1.id ,t2.val1 from t1 inner join t2 on t1.id=t2.id; create table t1 as select * from &syslast; quit;
Is the two step approach better/safer to use?