‎2009 Jun 17 2:16 PM
Hi all experts,
I have a field, let's say SHORTTXT, which is a STEXT field that contains name and surname of a person; the order in which these two information are present in the string is not known a priori, and also the case should be irrelevant.
Now; given two field, say NAME1 and NAME2, I'd like to express the following condition, that should be case insensitive:
if NAME1 and NAME2 are both substrings of SHORTTXT....
What's the correct way to express this condition? Which cmp operator should I use? The 'contains' one seems to be case sensitive....
‎2009 Jun 17 2:20 PM
Hi,
Use the 'Contains String' i.e. 'CS' operation... If it doesnt work you can use 'TRANSLATE' first and then do the comparision..
‎2009 Jun 17 2:20 PM
Hi,
Use the 'Contains String' i.e. 'CS' operation... If it doesnt work you can use 'TRANSLATE' first and then do the comparision..
‎2009 Jun 17 2:22 PM
sneha, CS is case-sensitive.
'ABcdEF' CS 'CD' returns false. That's not my desiderata. Thanks anyway
‎2009 Jun 17 2:23 PM
This also is a pretty basic question - you have to translate both to the same case.
Rob
‎2009 Jun 17 2:24 PM
Hi Matteo,
That is what i said... If it doesnt work please 'Translate' it to your desired forrmat and then check it..
‎2009 Jun 17 2:25 PM
‎2009 Jun 17 2:31 PM
You don't have to translate.
'ABcdEF' CS 'CD'
returns true in my program.
‎2009 Jun 17 2:44 PM
>
> You don't have to translate.
Yup - seems to be true. But case sensitivity is a consideration in SELECTs. I guess that's what we were thinking.
Hat's off to you
Rob
‎2009 Jun 17 2:23 PM
HI,,
IF SHORTTXT CS NAME1 and SHORTTXT CS NAME2
endif.
Thanks
Sudheer
‎2009 Jun 17 2:30 PM
Thanks to you all, I thought there was a way to compare strings in a case-insensitive mode, anyway the suggested solution works as well.