Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello QVer
I want to compare two strings if there are differences between 2010 and 2011.
Superficially seen there is no diff. but when matching them with i.e. match function the result is 0.
The reason I found is that there are two spaces [chr(32) + chr(160)] responsible for the diff.
Example:
2010: "ABC > DE F" = "ABC > DEF" [after removing chr(32) with replace function]
2011: "ABC > DE F" = "ABC>DE F" [after removing chr(160) with replace function]
My goal is "ABC>DEF"
Now I want to standardise them in making strings without spaces.
The only way to do I found the function replace in two steps.
Does anybody have an idea to solve that in one step?
Thanks and greetings
dj_skbs [QV 90074408SR3]
Hello,
Depending on what your field has, one solution is using the following in your load script:
KeepChar(Field, 'ABCDEFGHIJKLMNOPQRSTUVXYZ><') AS Field
or the opposite
PurgeChar(Field, chr(32) & chr(160)) AS Field
Hope that helps
Returns the string s1 less all characters contained in string s2.
-Alex
Hello,
Depending on what your field has, one solution is using the following in your load script:
KeepChar(Field, 'ABCDEFGHIJKLMNOPQRSTUVXYZ><') AS Field
or the opposite
PurgeChar(Field, chr(32) & chr(160)) AS Field
Hope that helps
Solved with
PurgeChar(Field, chr(32) & chr(160)).
I tried everything also with Purgechar but not with the "&" combination.
Thank You Miguel + Alexandru
dj_skbs