Search between source table and lookup table

  • I have a table that has a list of category codes and keywords.

    For example code=1234, keywords=bakery,baking,pastry

    I want to search against another table that has titles, looking at all the keywords and return the category code that found a match.

    If my table had a title of "Famous French Pastries"

    I would want to return "Famouse French pastries", 1234

    My titles table has about 1M rows and grows about 20k / day.

    My category table has about 25k records.

    What is the best way to search between the two tables?

    Full text search? Split out the keywords into a single row and join the two tables?

    Any ideas are welcome, thanks...

  • Mike Wiz (3/2/2016)


    I have a table that has a list of category codes and keywords.

    For example code=1234, keywords=bakery,baking,pastry

    I want to search against another table that has titles, looking at all the keywords and return the category code that found a match.

    If my table had a title of "Famous French Pastries"

    I would want to return "Famouse French pastries", 1234

    My titles table has about 1M rows and grows about 20k / day.

    My category table has about 25k records.

    What is the best way to search between the two tables?

    Full text search? Split out the keywords into a single row and join the two tables?

    Any ideas are welcome, thanks...

    In my opinion, the best way is to split your keywords. Do not use a WHILE loop or CURSOR to do this. Instead, search this site for the blazing-fast delimited8kSplit function and use that.

    However, that will not allow you to match 'pastry' with 'pastries'. If you need this kind of matching, things will have to get more sophisticated and you'll possibly have to look at full-text searching.

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply