Date: Sat, 18 Nov 2006 02:35:09 -0800
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
Subject: Re: Running PROC SQL without QUIT
Content-Type: text/plain; charset="us-ascii"
Thanx very much for the indepth insight and redirection to the latest
documentation. Infact i've read some of the information provided in My
SAS HELP, but still I was so confused after going in depth from link to
link that I got confused and was pulling my hair.....Infact there is a
lot of information added to the 9.1.3 as compared to 9.0.
This time I ensured that I noted the contents specifically and tried to
reread a few times to understand.
Thanx once again for timely response and help.
> Dear Srinivas,
> PROC SQL Executes each statement individually.
> On page
> http://support.sas.com/onlinedoc/913/getDoc/en/proc.hlp/sql-overview.htm you
> can read in the section SQL Procedure Coding Conventions.
> Because PROC SQL implements Structured Query Language, it works somewhat
> differently from other base SAS procedures, as described here:
> When a PROC SQL statement is executed, PROC SQL continues to run until a
> QUIT statement, a DATA step, or another SAS procedure is executed.
> Therefore, you do not need to repeat the PROC SQL statement with each SQL
> statement. You need to repeat the PROC SQL statement only if you execute a
> QUIT statement, a DATA step, or another SAS procedure between SQL
> The difference between pass through and the libname engine is that pass
> through gives you space to use the SQL dialect of your data source where the
> libname engine enables you to use the Sas dialect of the SQL language. You
> can read on page
> http://support.sas.com/onlinedoc/913/getDoc/en/proc.hlp/a002473677.htm how
> the EXECUTE statement sends a DBMS-specific SQL statement to a DBMS that is
> supported by a SAS/ACCESS interface and on page
> http://support.sas.com/onlinedoc/913/getDoc/en/proc.hlp/a002473686.htm how
> the CONNECTION TO component of the SELECT statement retrieves and uses DBMS
> data in a PROC SQL query or view.
> gives an overview on how to select a SAS/ACCESS Method for your work.
> The "front door"of these pages is
> Kind regards,
> <email@example.com> wrote in message
> > hello all,
> > I just want to know what happens when u run a Proc SQL without QUIT? I
> > tried running wihtout the QUIT statement but its showing the same
> > result as with QUIT.
> > For example, I ran the following statements with and without QUIT,
> > jfyi:
> > LIBNAME Orcl ORACLE USER=SCOTT PASSWORD=TIGER PRESERVE_NAMES=YES;
> > PROC SQL;
> > SELECT ENAME,EMPNO,DEPTNO FROM ORCL.EMP;
> > /*QUIT;*/
> > So can anyone enlighten me on this issue, as well as the difference
> > between SAS/ACCESS LIBNAME and PASS THRU methods? I tried reading the
> > SAS documentation but it didnt quite clear my doubt. So can anyone give
> > an explicit definition with some examples and when/where do they need
> > to be used, please. Are we not achieving the same functionality using
> > both the above methods? Somehow i'm not able to get a clear picture as
> > to under what context do I need to be able to use them?
> > Excerpts from SAS Documentation:
> > "SAS/ACCESS enables you to read, update, insert, and delete data from a
> > DBMS object as if it were a SAS data set.
> > The LIBNAME statement enables you to assign SAS librefs to DBMS objects
> > such as schemas and databases. After a database is associated with a
> > libref, you can use a SAS two-level name to specify any table or view
> > in the database and then work with the table or view as you would with
> > a SAS data set.
> > When you read and update DBMS data with the Pass-Through Facility,
> > SAS/ACCESS passes SQL statements directly to the DBMS for processing.
> > The Pass-Through Facility enables you to interact with a data source
> > using its SQL syntax without leaving your SAS session. The SQL
> > statements are passed directly to the data source for processing."
> > Cheers and have a great day.
> > Srinivas