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 (July 2008, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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
Comments: To: Satya <>
In-Reply-To:  <>
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_, <> 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 <> 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. > > >

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