Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi all,
i would like to know how i can show number 0 in this example:
i have field name Serial and the contact like that: "CCA 0101000","CCA 0101002","CCA 0101003"
"it 11 characters after CCA have space" and when i need to show just numbers i user that code: max(right(Serial , 7)) as S.N
the result i get is : "101000","101002","101003"
how can i show the first 0 by code?
thanks
Another option if you must use the Max function:
MAXSTRING(RIGHT(Serial, 7)) AS S.N
Hi,
Max will return the numeric value therefore you don't get a 0. If the 0 is always ther in the field then you just append a 0 to the Max field.
'0'&Max(....) as SN
Regards,
Syed Muzammil.
try this:
text(right(Serial , 7)) as S.N
Try put mask in your result
Ex.:
=Num(max(right((Serial , 7)), '0000000')
Another option if you must use the Max function:
MAXSTRING(RIGHT(Serial, 7)) AS S.N
thanks jsomsen it´s working ... your answer is perfect... thanks alot
Even right(Serial , 7) as S.N will work...Just remove the max() from your code and check it...
i can´t remove the max because i need to get the last Serial .... thanks
also with jsomsen answer to user maxstring i not need to divide the cell with "right"