Skip to main content

Comment Splitting

Well, thanks to the keen eye of my brother a small, but important, slip up has been fixed. It was an artifact of using the SQL SELECT ... WHERE ... LIKE ... % clause, and I was just simply checking for the categories based on their index number. The problem with that was the SELECT statement was "WHERE Categories LIKE '%' + CAST(@categoryID AS nvarchar(10)) + '%' . All that did was check the category number for <anything>CategoryNumber<anything> - which worked just fine with single digit numbers. Jared noticied this with category #2, which matched everything from category 2, 12, all of the 20s, etc. To remedy this, I changed the layout to use pipes, so now they are stored like |1|2|3| instead of 1,2,3. Once again, thanks Jared!