Go Back   Rhinocerus > Newsgroup > Newsgroup comp.soft-sys.sas

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 06-15-2008, 02:24 PM
Anindya Mozumdar
Guest
 
Posts: n/a
Default Re: Question on proc sql

The official SAS documentation recommends to use SQL rather than the
DATA step for grouping and subsetting data. The SQL engine has been
made much better in SAS 9 - which probably explains those who started
from the SAS 6 days claim that the data step is faster whereas
actually it may not be. The fact that SAS wants you to move towards
SQL is also demonstrated by Enterprise Guide generating all internal
code in SQL rather than base SAS.

On Fri, Jun 13, 2008 at 6:37 AM, Sigurd Hermansen <HERMANS1@westat.com> wrote:
> Sorry, Howard, you don't have the necessary degree of stubbornness and
> monomania to qualify as a true SQLHead. I've seen your thoughtful and,
> dare I say it, elegant procedural Data step solutions. By analogy, can
> you imagine a deadhead rendition of a minuet? A true SQLHead has to go
> way out of his way to force every problem into a SQL solution. I've done
> that and have the scars to prove it. Who on the 'L hasn't said at one
> time or another "There goes that fool and his crazy SQL solutions."
> That's the mark of a true SQLHead.
>
> Of course I'm more than willing to let you in the club the next time we
> assemble a team to compete in a programming Olympics. The SQLHeads ruled
> in Seattle due, in no small measure, to the contributions of guys much
> less committed to SAS SQL than I. Thanks Paul, Quentin, and Greg.
> S
>
> -----Original Message-----
> From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
> Howard Schreier <hs AT dc-sug DOT org>
> Sent: Thursday, June 12, 2008 5:54 PM
> To: SAS-L@LISTSERV.UGA.EDU
> Subject: Re: Question on proc sql
>
>
> On Thu, 12 Jun 2008 10:40:22 -0400, Sigurd Hermansen
> <HERMANS1@WESTAT.COM>
> wrote:
>
>>Lorna:
>>I've just found a few free minutes to respond to your question about
>>SAS SQL ...
>>
>>You can trust me, the original SQLHead on SAS-L,

>
> Are you sure? I started posting SQL solutions on SAS-L in about 1991.
>
>>to give you an unbiased
>>and objective appraisal of SAS SQL's virtues vs. that other dirty Data
>>step quasi-procedural language that SAS still supports. Just replace
>>"Mac" with "SQL" and "PC" with "Data step" in those TV commercials and
>>you'll have the drift of my idea about SAS SQL vs. the SAS Data step
>>language.
>>
>>SQL currently dominates the arena of database programming languages.
>>That doesn't make SQL an ideal instance of a logic-set language, but it

>
>>has substantial advantages in some respects over languages that process

>
>>records and fields (or even those that process obs and variables). To
>>name a few,
>>
>>1. SQL operates on relations (views, tables, etc.), thus freeing
>>database programmers from the risky business of building explicit
>>loops, while Data steps allow a confusing mixture of step-by-step
>>processes (e.g., a sequence of assignments) and before and after
>>operations (e.g., ATTRIBUTE and KEEP statements); 2. A SQL SELECT
>>statement always produces (yields) a relation, allowing nesting of
>>encapsulated SQL statements, while Data steps accumulate a trail of
>>datasets or views; 3. SQL allows references to a dataset/view and
>>variable, making it easier to figure out sources of values, while DATA
>>steps don't; 4. SQL doesn't require a programmer to sort datasets and
>>remains agnostic to ordering of tuples (obs) and attributes
>>(variables), unlike the Data step;
>>5. SQL joins appear several levels higher on the database programming
>>tree of evolution than Data step merges (think sea otter vs.

> alligator);
>>6. SAS SQL segues cleanly into SAS/Access to external databases;
>>7. SAS SQL programmers have more fun.
>>
>>Now I must add that SAS-L has a number of very clever and creative
>>programmers who make good use of the Turing-complete features of the
>>SAS Data step. They may see some of what I see as disadvantages of the
>>Data step as advantages. It pays to learn both, and to continue
>>learning both. Really good programmers don't use the same set of Data
>>step or SQL operations in the same way that they used them a few years
>>earlier. S
>>
>>-----Original Message-----
>>From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
>>Simon, Lorna
>>Sent: Monday, June 09, 2008 10:36 AM
>>To: SAS-L@LISTSERV.UGA.EDU
>>Subject: Question on proc sql
>>
>>
>>I have a question about sql - what is the advantage of learning it? Are

>
>>there things you can do in sql that you can't do in a regular sas data
>>step?

>

Reply With Quote
Alt Today
Advertising
 
and become member of Rhinocerus
Standard Sponsored Links

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: A question about proc sql Michael Raithel Newsgroup comp.soft-sys.sas 0 11-23-2007 12:50 PM
Re: PROC SQL question Jack Clark Newsgroup comp.soft-sys.sas 0 03-22-2007 02:27 PM
Re: A SAS patch changed the way PROC SQL worked and changed the Sigurd Hermansen Newsgroup comp.soft-sys.sas 0 12-05-2006 05:45 PM
Re: NEED SAS examples on Conjoint Analysis and MDS Wu Consulting Newsgroup comp.soft-sys.sas 0 10-23-2006 01:29 PM
Re: PROC SQL question Ian Whitlock Newsgroup comp.soft-sys.sas 0 04-23-2006 07:15 PM



All times are GMT. The time now is 02:18 AM.


Copyright ©2009

LinkBacks Enabled by vBSEO 3.3.0 RC2 © 2009, Crawlability, Inc.