mask to insert spaces before text?


Author
Message
Fabian R Silva, -
Fabian R Silva, -
StrataFrame User (267 reputation)StrataFrame User (267 reputation)StrataFrame User (267 reputation)StrataFrame User (267 reputation)StrataFrame User (267 reputation)StrataFrame User (267 reputation)StrataFrame User (267 reputation)StrataFrame User (267 reputation)StrataFrame User (267 reputation)
Group: StrataFrame Users
Posts: 153, Visits: 1.2K
I have certain codes (example: customer code) that can have numbers or alphanumerical characters example "AB123" or "123" or "123AB"



If I save some customer codes like "1" "2" and "11", when I try to order by this field the "11" will be on 2nd place



1,

11

2



only if I put a space before the number will be orderer ok ( " 1", " 2", "11")



1

2

11



what do you recommend to do ? can I only add spaces when I like to persist the code that a user enter on the field to the DB to order it correctly? how is the best to do this?

Thanks for any suggestion.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search