Hi Rachel,

I think this works:

age=(SGET('000'+age,3,SLEN(age)+1))

Regards,

Stephen Markson
416 512 6950

> -----Original Message-----
>
> From: [email protected] [mailto:[email protected]] On Behalf Of Rachael
> Malberg
> Sent: Friday, July 09, 2010 16:23
> To: RBASE-L Mailing List
> Subject: [RBASE-L] - how to do a right(string,n) in rbase
> 
> here's the set up as to why...
> 
> When you sort text ages it is like so...
> 110
> 1
> 10
> 2
> 24
> 3
> 32
> 33
> 38
> etc...
> 
> it's not exactly as intended, so I'd like to add proceeding zeros and in
> sql
> it's
> right('00'+age,3)
> ie add the zeros and get the 3 charactors starting with the last
> 
> so the samples would then sort as...
> 001
> 002
> 003
> 010
> 024
> 032
> 033
> 038
> 110
> 
> how would I do that in rbase?
> 
> Rachael M
> Freelance Developer
> (218) 326-2719
> www.DragonflyDevelopmentMN.com
> 
> 
> 
> 
> 
> 
> No virus found in this incoming message.
> Checked by AVG - www.avg.com
> Version: 9.0.830 / Virus Database: 271.1.1/2983 - Release Date: 07/09/10
> 02:36:00


Reply via email to