From: SAS User on
On 12 June, 16:49, "Lou" <lpog...(a)hotmail.com> wrote:
> "SAS User" <sasuser2...(a)googlemail.com> wrote in message
>
> news:812b59ce-fc81-4d87-bfae-60d9221cbb88(a)g19g2000yqc.googlegroups.com...
>
> > Hi
>
> > My source datatset  test4 is already sorted and I do not want to
> > change it. When I create a new dataset new dataset is being sorted by
> > name and I don't want this to happen. Can I stop it from happening?
>
> > proc sql;
> > create table test5 as
> > select distinct name  from test4;
> > quit;
>
> > I need to keep the same order from before I de-duplicated test4.
>
> If your dataset TEST4 was sorted by NAME you wouldn't have to ask the
> question, so it's a little unclear what you're after.  For instance, if the
> original dataset has NAME in some order like AABBCCAADD, should your result
> be ABCD or BCAD (since you specify "distinct" it couldn't be ABCAD, and if
> there weren't duplicate values of NAME you wouldn't have to specify
> distinct)?

Richard has understood my issue correctly. My last query is because I
am a novice programmer.

:ee
From: SAS User on
Richard,

I have used your code successfully now. It just took me a while to
understand the code.

Thank you for taking the time out to help me.

Lee
First  |  Prev  | 
Pages: 1 2
Prev: Loop
Next: correlation coefficient by date and time