On Mon, 9 Jun 2008 10:36:26 -0400, Simon, Lorna <Lorna.Simon@UMASSMED.EDU>
>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
Very rare things. Some kinds of merging are hard to do in DATA step. E.g.
n:m merges, which produce a cartesian product is hard to do in DATA-step.
(I don't say impossible! Otherwise the next poster shows me, how to do it.
I don't even try it, because it's so easy in PROQ SQL).
I see one advatage: all relational-DB specialists know SQL. They normally
don't know SAS. For them it is easier to step into the SAS world with SQL.
The other thing is: if you deal with interfaces to relational DBs, it
might be helpful to code things directly in the DB-language.
I prefer SAS, because for me SQL is not easy to read and to understand.
It's sometimes really a kind of "black box" and hard to say what happens.
That is easier for me to understand in DATA-step.
But I sometimes saw very elegant and short solutions for things which are
complicated in DATA step. For that it is good to know about.
And: it's never a fault to know both worlds! So you can pick out the best
things of each.