Date: Fri, 18 Jul 2008 06:24:14 -0500
Reply-To: "data _null_," <datanull@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "data _null_," <datanull@GMAIL.COM>
Subject: Re: Change all fields within a dataset to char
In-Reply-To: <7367b4e20807180421i610b799dsf6b4026e4c49e7f4@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
This requires at least one character in the data set to get the
conversion. If you don't have that. use a view to create a dummy.
data view / view=view;
set sashelp.class;
retain dummy ' ';
run;
Then drop dummy when the opportunity arises.
On 7/18/08, data _null_, <datanull@gmail.com> wrote:
> Best is subjective.
>
> proc transpose data=sashelp.class;
> var _all_;
> run;
> proc transpose out=characterClass(drop=_name_);
> var col:;
> run;
> proc contents varnum;
> run;
> proc print;
> run;
>
> On 7/18/08, Satya <kondal4uall@gmail.com> wrote:
> > I have imported a dataset from a sql database.
> > I now want to change all fields within the dataset to char.
> > What is the best method of doing this.
> >
>
|