Table 1
DataValue TokenIndex
AB NULL
TABLE 2
TokenIndex TokenValue
1 AB
2 ABAC
i want to update my table1 (TokenIndex) with the (TokenIndex) of table2 where table1 (DataValue) (sql LIKE) with (TokenValue)
TABLE 2 with longest string
EG. AB like like AB,and ABAC also but i want 'ABAC' TokenIndex (which is 2) to update in Token index of Table 1 against AB
i want retult
Table 1
DataValue TokenIndex
AB 2