| Date: | Mon, 1 Jun 2009 14:18:57 +0530 |
| Reply-To: | mahesh kumar peesari <peesari.mahesh@GMAIL.COM> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | mahesh kumar peesari <peesari.mahesh@GMAIL.COM> |
| Subject: | Re: Remove leading zeros... |
|
| In-Reply-To: | <370a7f93-6b45-4730-9c0c-a87008de636b@g19g2000yql.googlegroups.com> |
| Content-Type: | text/plain; charset=ISO-8859-1 |
Thanks A lot.
On Mon, Jun 1, 2009 at 2:07 PM, RolandRB <rolandberry@hotmail.com> wrote:
> On Jun 1, 9:20 am, peesari.mah...@GMAIL.COM (mahesh kumar peesari)
> wrote:
> > hi,
> > I am working on DI studio, and i am extracting data from SAP tables which
> > are character.and the data in target tables is also character type.
> > so i can do this using this expression: PUT(INPUT(ZERO,20.)*1,20.)
> > But i was still wondering if there is any function which can directly
> remove
> > leading zeros.
> >
> > Thanks
>
> You can use the verify function for this.
>
> data _null_;
> str="00000400000";
> str=substr(str,verify(str,"0"));
> put str=;
> run;
>
--
Jack Of All Trades....But Master Of NONE....
|