LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (March 2006, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 29 Mar 2006 09:32:17 -0600
Reply-To:     baogong jiang <bgjiang@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         baogong jiang <bgjiang@GMAIL.COM>
Subject:      Re: Summing variables
Comments: To: "Mogens A. Krogh" <MKROGH@dsr.kvl.dk>
In-Reply-To:  <1143614561.831633.119650@g10g2000cwb.googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-1

Clint:

SQL answer:

*

data* have;

input ident a1 a2 a3 a4;

cards;

1020902 8 0 8 2

1020902 5 0 3 3

1020902 1 0 8 7

1020920 2 0 3 2

1020920 6 0 4 3

1020920 7 0 4 3

1021132 3 0 2 1

;; *

proc* *sql*;

create table need as

select ident ,sum(a1) as a1,sum(a2)as a2,sum(a3) as a3,sum(a4)as a4

from have

group by ident; *

proc* *print*;*run*;* *

Baoogng Jiang Department of Agronomy Lousisana State University


Back to: Top of message | Previous page | Main SAS-L page