Hi TD Experts -
My background is in SQL Server and have been recently a migrant to TD. My question is:
I need to identify if a record contains a non-Latin character. This is not a do something once found, but a simple if the character exists, return 1, else 0.
I imagine I am overthinking this - and tried a couple of find functions - with no success.
How do you define "non-Latin", a character not from the LATIN charset?
TRANSLATE_CHK(col USING UNICODE_TO_LATIN) returns the position of the 1st non-Latin character (or zero).
Otherwise you might try a regular expression:
regexp_similar(col,'.*\W+.*') returns 0 if the only characters are 'a'-'z','0'-'9' and '_', otherwise 1. This can be easily changed to any list of allowed characters.
Actually the first will work just fine! I can create a case statement out of it and as long as it >0, and <>'' should be just fine!
Appreciate the help.