Home Forums SQL Server 7,2000 T-SQL Compare Two sets of delimited string items RE: Compare Two sets of delimited string items

  • kenneth.bucci (1/21/2013)


    This is how we fixed it:

    (@Issue is not null and exists

    (select 1 from IssueCodes where charindex(IssueCode, @Issue) <> 0 AND charindex(IssueCode, SPL.IssCode) <> 0)))

    Works like a charm!

    Glad you fixed it and thanks for letting us know. If you have very many rows in those tables the performance here is likely to suffer greatly. If there is any chance you can normalize your data it would make your life a lot easier...of course this isn't always possible. :w00t:

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/