I want to update table 1 referring from values of table 3 and table 2
Table1
Table2
Table3
I want to update column 'price' of table1 where the value of store_div of table1's 'store_num' from table3 is equals to store_div from table2.
I already tried joining table1 and table3 to get each store_num's store_div value but I don't know where to point my where clause because store_div is not present on table1.
The update would look like this:
Update Table1 t1 set price = '0'
join Table t3 on t1.store_num = t3.store_num
where ([t1.store_num]'s [store_div] = Table2.store_div)
I'm not really sure on the where clause tho.
Any help would be appreciated.