|
Sophia,
Essentially a view is not data itself, but rather the SQL code that defines
how to pull the data from the table. Thus no, you can't take a SAS data
set and push it to SQL server as a view. What you can do is to create a
view from a SQL Server table. If you want to do that from SAS, use
pass-through SQL with an Execute( ) statement, and the SQL server code to
create the view would need to be inside the execute statement.
If you know MS Access, a View in SQL Server is like a stored query in
Microsoft Access.
-Mary
----- Original Message -----
From: "Sophia Tong" <sophiDT@HOTMAIL.COM>
To: <SAS-L@LISTSERV.UGA.EDU>
Sent: Wednesday, April 29, 2009 12:35 PM
Subject: Can SAS view be loaded to SQL server?
> Dear listers,
>
> We are trying to create view in SQL server, since we have already had SAS
> view created by SAS SQL, so we try to upload SAS view to SQL server
> instead
> of re-create one. We only had experience to upload SAS table to SQL
> server
> but never upload a view. We tried the code for uploading SAS table, and
> it
> turns out SQL server took it as table instead of view. My questions are:
>
> Can SAS view be uploaded to SQL server?
> If yes, can anyone kindly provide the correct code for it?
>
> Thanks in advance,
>
> Sophia
|