Help using Base SAS procedures

Attempt to append a view to itself

Reply
Frequent Contributor
Posts: 82

Attempt to append a view to itself

I have this code:

proc append base = s1 (COMPRESS = YES) data = WORK.s2 () force ;

MPRINT(ETLS_LOADER):   run;

I get:

NOTE: Appending WORK.s2 to s1.

ERROR: Attempt to append a view to itself.

Now how am I appending view to iself...I did not write proc append base = s1 data = s1...so what is the problem.

It is true that s2 is a dataset that is 'derived' from s1 throguh a series of transformations....but is that a problem?

Trusted Advisor
Posts: 3,214

Re: Attempt to append a view to itself

Posted in reply to eagles_dare13

Are you using DI?   (ETLS_Loader) the generated is often based on using views. 
I can imagine proc append does not like that as it optimized to extend a physicial dataset.

---->-- ja karman --<-----
Frequent Contributor
Posts: 82

Re: Attempt to append a view to itself

yes  Iam using DI. Is there a way to get around this?

Trusted Advisor
Posts: 3,214

Re: Attempt to append a view to itself

Posted in reply to eagles_dare13

http://support.sas.com/resources/papers/proceedings10/039-2010.pdf middle of page 6

---->-- ja karman --<-----
Super User
Posts: 10,035

Re: Attempt to append a view to itself

Posted in reply to eagles_dare13

View is just a bunch of code . It can't be true to append a view into another view.

data class;
 set sashelp.class;
run;


proc sql;
create view cl as
 select * from class;


create view append as
 select * from cl
 union all corr
 select * from cl
 ;
quit;

Xia Keshan

Message was edited by: xia keshan

Ask a Question
Discussion stats
  • 4 replies
  • 514 views
  • 3 likes
  • 3 in conversation