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 (April 2009, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 29 Apr 2009 13:04:22 -0500
Reply-To:   Mary <mlhoward@AVALON.NET>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Mary <mlhoward@AVALON.NET>
Subject:   Re: Can SAS view be loaded to SQL server?
Comments:   To: Sophia Tong <sophiDT@HOTMAIL.COM>
Content-Type:   text/plain; format=flowed; charset="Windows-1252"; reply-type=original

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


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