Date: Tue, 18 Jul 2006 00:25:49 -0700
Reply-To: David L Cassell <davidlcassell@MSN.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: David L Cassell <davidlcassell@MSN.COM>
Subject: Re: How to change variable type for a entire SAS dataset
Content-Type: text/plain; format=flowed
>I am importing Excel data into SAS, however, all the variables are read in
>as CHAR, they really should be in NUM. Is there any procedure will fix
I see you have already received excellent advice on how to fix the
Let me make a different suggestion. Try to fix the problem before
it occurs. The problem is arising because you are using a spreadsheet
as your database system. This is asking for trouble. As you just
found out. You have columns which have numeric and character data
both. A SAS table is a database. Each column can be numeric. Or
character. But not both. So SAS has to make a judgment call, and
decide what to do with your troublesome data.
If you can fix your Excel data so that the character strings in your
numerics are removed or turned into meaningful missing values,
then SAS can read the data in as numeric.
David L. Cassell
3115 NW Norwood Pl.
Corvallis OR 97330
Express yourself instantly with MSN Messenger! Download today - it's FREE!