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/18/2013)


    Thank you for your reply.

    I am still not sure how to compare the two sets of delimited string items. Each item in one list must be in the other string. That is really what I am looking for an answer. If I could do that dynamically without looking listing each item, it would be ideal.

    I would be happy to help you but you are going to have to provide a bit more detail. All you have posted is a query snippet with some parameters. If you can elaborate on what it is exactly you are trying to do I can help. Are you saying 2 of these parameters contain comma separated lists of values?

    The only I can figure out is the parameter @Issues is a list of values. Then you want to effectively do a join to SPL.IssCode or something like that?

    With the lack of detail posted so far about all I can do is take a shot in the dark. If you can take a look at the first link in my signature for best practices when posting questions it will explain the types of information needed. I suspect you will need to parse your delimited string into a table in order to make this work. You can read about that by following the link in my signature about splitting strings.

    _______________________________________________________________

    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/