Hello,
On Mittwoch, 22. Januar 2003 09:36, Andreas Ernst wrote:
> >>i have a strange behavior an the system:
> >>
> >>create table masch ( lagnr CHAR( 8), primary key ( LAGNR))
> >>
> >>insert masch values ('9999')
> >>insert masch values ('10000')
> >>
> >>select max(lagnr) from masch
> >>
> >>I get the result:    9999
> >>
> >You've declared the field as char,
> >so the values are strings and they are compared this
> >way.
> >In 9999 the first position (9) is bigger than
> >the first position of 10000(1), so the result is OK.
> thanks for your answer.
>
> I this field i need also char values, so i cannot use only numeric values.
>
> Than i have to do a work around.
>
You might pad the numbers to the left with zeroes.
Should be quite easy.
00009999 is less than 00010000 as well as number as as string.

Peter Willadt
_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general

Reply via email to