Date: Mon, 17 Dec 2007 08:33:55 -0800
Reply-To: "Han, Joanne" <JHan@UNEX.UCLA.EDU>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: "Han, Joanne" <JHan@UNEX.UCLA.EDU>
Subject: Re: R: Building Syntax Script to Add Truncated Zeros to Zip Field
In-Reply-To: A<425413.24809.qm@web32713.mail.mud.yahoo.com>
Content-Type: text/plain; charset="iso-8859-1"
Thanks everyone for the responses!
-----Original Message-----
From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf Of Albert-jan Roskam
Sent: Monday, December 17, 2007 1:30 AM
To: SPSSX-L@LISTSERV.UGA.EDU
Subject: Re: R: Building Syntax Script to Add Truncated Zeros to Zip Field
Hi,
You can add an apostrophe to your zip code variable
before you export it to xls. This assumes that your
existing zip code variable already is a string
variable, and has the right width + one extra (for the
additional apostrophe).
compute zipnew = concat("'",zipold).
Cheers!!
Albert-Jan
--- Luca Meyer <lucam1968@GMAIL.COM> wrote:
> Are you sure that the csv format has truncated
> leading zeros? Have you
> opened the file in Excel? If so, try to open the
> same file with textpad or
> any other text editor and you should find the
> leading zero in your zip codes
> as Excel automatically eliminates leading zeros,
> unless of course they were
> not present when the csv file was created...
>
> Cheers,
> Luca
>
> Mr. Luca MEYER
> Market research, data analysis & more
> www.lucameyer.com - Tel: +39.339.495.00.21
>
>
> -----Messaggio originale-----
> Da: SPSSX(r) Discussion
> [mailto:SPSSX-L@LISTSERV.UGA.EDU] Per conto di
> <Joanne Tse>
> Inviato: venerd́ 14 dicembre 2007 22.16
> A: SPSSX-L@LISTSERV.UGA.EDU
> Oggetto: Building Syntax Script to Add Truncated
> Zeros to Zip Field
>
> The original import file is a csv file and it
> truncates leading zeros. Is
> there a syntax script that will automatically add
> the zeros back into the
> zip fields. Sometimes I need to add 1 zero and
> sometimes 2 zeros.
>
> Thanks.
>
> =====================
> To manage your subscription to SPSSX-L, send a
> message to
> LISTSERV@LISTSERV.UGA.EDU (not to SPSSX-L), with no
> body text except the
> command. To leave the list, send the command SIGNOFF
> SPSSX-L For a list of
> commands to manage subscriptions, send the command
> INFO REFCARD
>
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.503 / Virus Database: 269.17.1/1183 -
> Release Date: 13/12/2007
> 9.15
>
>
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.5.503 / Virus Database: 269.17.1/1183 -
> Release Date: 13/12/2007
> 9.15
>
> =====================
> To manage your subscription to SPSSX-L, send a
> message to
> LISTSERV@LISTSERV.UGA.EDU (not to SPSSX-L), with no
> body text except the
> command. To leave the list, send the command
> SIGNOFF SPSSX-L
> For a list of commands to manage subscriptions, send
> the command
> INFO REFCARD
>
Cheers!
Albert-Jan
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Did you know that 87.166253% of all statistics claim a precision of results that is not justified by the method employed? [HELMUT RICHTER]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
____________________________________________________________________________________
Looking for last minute shopping deals?
Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping
=====================
To manage your subscription to SPSSX-L, send a message to
LISTSERV@LISTSERV.UGA.EDU (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
=====================
To manage your subscription to SPSSX-L, send a message to
LISTSERV@LISTSERV.UGA.EDU (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
|