Monday, March 12, 2012

Describe View

Below is the piece of SAS code to find view definition –

proc sql;
describe view libname.view;
quit;

Output:
NOTE: SQL view LIBNAME.VIEW is defined as:

select distinct str.STR_ID
from XYZ.AAA str

where str.STR_ID= 101;

Make use of view definition in log and recreate view as below (If migrated to a new version of SAS)–

proc sql;
create view LIBNAME.VIEW as
select distinct str.STR_ID
from XYZ.AAA str

where str.STR_ID= 101;
quit;



No comments:

Post a Comment