views:

19

answers:

0

Hi all,

Which is the best way to check if 1 item or more of one delimited string exist in another?

I'd like to pass 2 delimited strings to a UDF and get back TRUE if at least one item of the first delimited string exists in the second delimited string.

delStr1="US,FR,DE"

delStr2="GB,DE,CA,IT,PL"

delStr3="CN,DK"

CheckDelimitedString(delStr1,DelStr2)= TRUE

CheckDelimitedString(delStr2,DelStr3)= FALSE

Do I need to read my delimited strings in 2 tables first?

Thanks in advance.