Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear All
I have a column in my data set called Name - this should contain names so values should be characters [A-Z] but unfortunately there are entries such as special characters or numbers.
How can I check if the value only contains characters [A-Z} please?
Thank you
JazzyK
May be like this
If(Len(Trim(PurgeChar(Lower(Name), 'abcdefghijklmnopqrstuvwxyz'))) > 0, 'Contain Special Characters or Numbers', 'Doesn't contain Special Characters or Numbers') as Flag
Hi Jasmit
If you want to clear the field then in your load script try using the following
KeepChar(Name,'ABCDEFGHIJKLMNOPQRSTUVWXYZ') as Name
If you need to keep Spaces then add a space into the list of Characters to keep, also if you wish to keep the lowercase letters as well then added those, the below version will also keep the spaces and lowercase letters.
KeepChar(Name,'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ') as Name
Regards
Adrian
Thank you. That worked perfectly...
Hi Jasmit
To help others if this has now answered your question please mark the correct reply and set it as answered.
Regards
Adrian