Rachael, SET VAR vagetext = (FORMAT(.vageinteger,'000'))
For FORMAT you have to start with an integer, date, etc. and you get text. With an integer or other value that can be negative, FORMAT will leave a leading position for the sign, so you may need to: SET VAR vagetext = (SGET(FORMAT(.vageinteger,'000'),3,2)) Emmitt Dove Manager, Converting Applications Development Evergreen Packaging, Inc. [email protected] (203) 214-5683 m (203) 643-8022 o (203) 643-8086 f [email protected] -----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

