Skip to main content

Pattern matching to look up ID?


Ashley_1
Forum|alt.badge.img+1
Can I use MATCH to look up for ID in another table? Example: Table1 LkID LkName ------ --------- 1 is 2 what Table2 ID Name -- --------- 1 good morning 2 xyz 3 this is a test I want to return the result from table2, and LkID from table1. In this sample, it should return the LkID=1 for ID=3.

2 replies

Aakash_Bordia

Navin_C
Forum|alt.badge.img+2
  • Participating Frequently
  • August 14, 2013
Hello Ashley, Match_id function applies to matching of integers Regexp_like function can be used in your scenario Please see the query as per your scenario below select LkID , ID from Table1 , Tabl2 where regexp_like(LkName, 'is') and regexp_like(Name , 'is'); this can give results as expected