Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

problem in comparison

Former Member
0 Likes
292

hi

i have a field A of length 3 (char field) and in my program every time i execute the program it should select the maximum number from the previous numbers add one to it and give the result. Now i increased the lengt to 4. my problem is

the current max number is 011 and since i have increased the length its giving me 0012. and every time its giving me the same number 0012 because its picking 011. how should i comapre 011 and 0012 and select the max number and give the output.

Edited by: Alvaro Tejada Galindo on Feb 11, 2008 11:30 AM

1 REPLY 1
Read only

Former Member
0 Likes
278

Take a 4 char variable ..

concatenate the 3 char letter as..

concatenate '0' v_3char into v_4char.

Now compare v_4char 0012 to know the max number ...