SETFILTER("Some Field",'%1','abc*');in a
SETRANGE("Some Field",'abc','abc' + PADSTR('',5,MaxSortingChar()));
MaxSortingChar() : Text[1] // MaxSortingChar // gives the char that comes last when sorting LtexLast := ''; FOR Lint := 0 TO 255 DO BEGIN Lcha := Lint; LtexTest := FORMAT(Lcha); IF LtexLast < LtexTest THEN LtexLast := LtexTest; END; EXIT(LtexLast);
Comments
=D> =D>
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Ran it on client sql I got 190
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
but one is case sensitive the the other isn't
Latin1_General_CS_AS
Latin1_General_CI_AI
that explains it.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
But still : use SETRANGE if possibile and not SETFILTER.
ara3n This is the reason I created this routine. I had noticed the sorting-problem between Navision and SQL and with this trick I invented I could avoid possible problems
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!