LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (April 2004)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 20 Apr 2004 13:40:23 -0400
Reply-To:     "Hetter, Rebecca D,,DMDCWEST" <HETTERRD@osd.pentagon.mil>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         "Hetter, Rebecca D,,DMDCWEST" <HETTERRD@osd.pentagon.mil>
Subject:      Re: Joining two numeric variables
Comments: To: Don Baker <DRRALPH@OU.EDU>
Content-Type: text/plain

This assumes that the student id has 6-digits. The "formats" statement is needed to preserve leading zeros in the original variables:

formats site(n4) stid(n6). string newvar(a10). compute newvar= concat(string(site,n4),string(stid,n6)).

-----Original Message----- From: Don Baker [mailto:DRRALPH@OU.EDU] Sent: Tuesday, April 20, 2004 10:10 AM To: SPSSX-L@LISTSERV.UGA.EDU Subject: Joining two numeric variables

I want to join (concatenate) the values of two numeric variables into a new variable. One variable is a four digit coalition site number and the other is a student id number. By joining the two variables I will be able to create a set of unique id numbers across several coalition sites.

Any suggestions?


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