
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to identify fields that only contain [A-Z] characters
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you. That worked perfectly...


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Jasmit
To help others if this has now answered your question please mark the correct reply and set it as answered.
Regards
Adrian
