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 (October 2008, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 31 Oct 2008 15:55:59 -0400
Reply-To:     Jack Clark <jclark@HILLTOP.UMBC.EDU>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Jack Clark <jclark@HILLTOP.UMBC.EDU>
Subject:      Re: removing something extra on the end of variables
Comments: To: Tiffany <tiffany.vidal@GMAIL.COM>
In-Reply-To:  A<7b0bba6b-4fa8-4e21-a674-abd373a32172@d42g2000prb.googlegroups.com>
Content-Type: text/plain; charset="us-ascii"

Issue a length statement to set the variable to $6

Data new; Length hullnum $ 6; Set old; Run;

Jack Clark Senior Research Analyst phone: 410-455-6256 fax: 410-455-6850 jclark@hilltop.umbc.edu

University of Maryland, Baltimore County Sondheim Hall, 3rd Floor 1000 Hilltop Circle Baltimore, MD 21250

Confidentiality Notice: This e-mail may contain information that is legally privileged and that is intended only for the use of the addressee(s) named above. If you are not the intended recipient, you are hereby notified that any disclosure, copying of this e-mail, distribution, or action taken in reliance on the contents of this e-mail and/or documents attributed to this e-mail is strictly prohibited. If you have received this information in error, please notify the sender immediately by phone and delete this entire e-mail. Thank you.-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Tiffany Sent: Friday, October 31, 2008 3:46 PM To: SAS-L@LISTSERV.UGA.EDU Subject: removing something extra on the end of variables

Hi,

I have imported data from excel into SAS. The field (hullnum) is set to $10. but my value is 6 characters. I am matching this field to another table with the same field (hullnum). I can see that the values are the same, but they are not matching. When I check the length of the two values, one is 7 characters (the one I imported from excel) and the other is 6 characters as it should be. I have tried trim(hullnum) and trim(left(hullnum)) trim(right(hullnum)) trim(left(right(hullnum))) but none work.

when I query for this hullnum in my imported data using: proc sql; select * from data where hullnum like 'ABCDEF%'

then it shows up. I need that % on the end. So something extra is there, I just can't figure out what it is and how to get rid of it. Any ideas?

thanks!


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