I need to loop through a dataset for any strings which match strings in another dataset.
I have a query called qry_imp_pplus_cross_ref_table containing several thousand unique records. Each record has a unique string field (text and number combinations) called details_no_wildcard.
Each details_no_record string in qry_imp_pplus_cross_ref_table may match (or match part of) a string called narrative in qry_imp_bankline_adv (which contains several thousand records).
I need a routine which takes each record from qry_imp_pplus_cross_ref_table, loops through qry_imp_bankline_adv for a match to the narrative field. If a match is found I need to have the record id from each table appended to a matching table (e.g. tbl_matching_items). Once it has cycled through using the first record from qry_imp_pplus_cross_ref_table it would loop to the next and search, until it has looped through all records in qry_imp_pplus_cross_ref_table.
I hope you can help. Thanks.