Date: Sat, 19 Feb 2011 13:16:33 -0800
Reply-To: Jack Hamilton <jfh@STANFORDALUMNI.ORG>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Jack Hamilton <jfh@STANFORDALUMNI.ORG>
Subject: Re: exercises for using (SAS PROC) SQL ?
In-Reply-To: <AANLkTimEP5P6U=qbRyOB8b6yQWK77_-qrqCkNyopp4Np@mail.gmail.com>
Content-Type: text/plain; charset=us-ascii
Even if it is not your goal to learn SQL, what Joe suggests is a good idea.
The data step is a procedural solution - you tell SAS what to do. SQL is a declarative solution - you tell SAS what you want. Recoding to the other method will often show you ways to improve your original method. And it's a valuable quality check - if the results from two different implementations agree, there's an increased chance that those results are correct. If they disagree, either there's an aspect of the problem or the code that you don't completely understand, or you've found a bug in SAS.
On Feb 19, 2011, at 12:46 PM, Joe Whitehurst wrote:
> Now, with all this great advice in hand, you could start rewriting all your
> important datastep code into the equivalent SQL code! That's one way to get
> the most from what you've got.
>
> On Sat, Feb 19, 2011 at 3:36 PM, bbser 2009 <bbser2009@gmail.com> wrote:
>
>> Jack
>>
>> Great recommendation! I also found this one: Joe Celko's SQL Puzzles and
>> Answers.
>> Is this guy a SQL monster? He wrote tons of topics in SQL.
>>
>> Thanks a lot.
>>
>> -Max
>>
>>
>> -----Original Message-----
>> From: Jack Hamilton [mailto:jfh@alumni.stanford.org]
>> Sent: February-19-11 3:16 PM
>> To: bbser 2009
>> Cc: SAS-L@LISTSERV.UGA.EDU
>> Subject: Re: [SAS-L] exercises for using (SAS PROC) SQL ?
>>
>> Not exactly what you asked about, and not specific to SAS, but if you're
>> going to be using SQL, you should read the books by Joe Celko, in
>> particular
>> "SQL For Smarties".
>>
>> The book on SQL style is also a good choice.
>>
>>
>>
>> On Feb 19, 2011, at 8:43 AM, bbser 2009 wrote:
>>
>>> Hi all,
>>>
>>>
>>>
>>> I was wondering, where could I find exercises to practice using (SAS
>> PROC)
>>> SQL?
>>> Is there a good book for this purpose?
>>>
>>>
>>>
>>> Any comments are welcome.
>>>
>>>
>>>
>>> Thanks.
>>>
>>> -Max
>>
|