string comparision???

sj1187534

Well-known member
Joined
Jun 10, 2003
Messages
108
Location
Dallas, Houston, etc.etc.
Hi....

I sure have a lot of questions today!!!

I have a string (S1) of CSV type. And I have another string (S2) of the same type, i.e. it is also a string with csv values.

Now, how can I check if any of the values in string S1 match with any of the values in string S2 ?????

~ SJ
 
Is this pure .NET code, or something in a stored procedure?

Either way, youre going to break apart each string into the individual values. In C# you could use the Split method of the string object. You could then loop through the array (or maybe use the Contains method?) for each value in the Other array and see there are any matches. In SQL you dont have arrays so youd have to put each individual value into a temp table and do the comparison thataways :)

-Nerseus
 
Back
Top