Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sql: Check if 1 or more items of one delimited string exist in another

Status
Not open for further replies.

chebil

Programmer
Oct 10, 2010
1
GB
Hi all,
Which is the best way to check if an 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,PL"
delStr3="CN,DK,IT"

UDF_CheckDelimitedStringItems(delStr1,DelStr2)= TRUE
UDF_CheckDelimitedStringItems(delStr2,DelStr3)= FALSE
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top