I have two tables:
TABLE1
TABLE2
Output need to be like this:
OUTPUT
select CODE, NAME, substring_index(DVAR, \',\', 1) as DATA