LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (November 2010, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 11 Nov 2010 13:37:52 -0500
Reply-To:     Ya Huang <ya.huang@AMYLIN.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Ya Huang <ya.huang@AMYLIN.COM>
Subject:      Directly reference dataset created view lost the reference?

Hi there,

The following code creates a permanent sql view. It directly reference the source dataset with the file path and name, instead of using the libname. (class.sas7bdat was copied to c:\temp before running the code).

libname x "c:\temp";

proc sql; create view x.directref as select * from "c:\temp\class.sas7bdat" where sex='F' ; describe view x.directref;

But the log shows that the reference is lost:

NOTE: SQL view X.DIRECTREF has been defined. 10 describe view x.directref; NOTE: SQL view X.DIRECTREF is defined as:

select * from where sex = 'F';

In fact if I try to use the view in another session, it gives me this:

1 libname x "c:\temp"; NOTE: Libref X was successfully assigned as follows: Engine: V9 Physical Name: c:\temp 2 3 proc print data=x.directref; ERROR: There is not a default input data set (_LAST_ is _NULL_). ERROR: SQL View X.DIRECTREF could not be processed because at least one of the data sets, or views, referenced directly (or indirectly) by it could not be located, or opened successfully. 4 run;

Any idea why? Or any way around? My intention is to create permanent views that point to some dataset constantly updating.

Thanks

Ya


Back to: Top of message | Previous page | Main SAS-L page