Hi I need to update table with values in two columns based on a condition.
So I would basically need to do the following
update columns SecurityCode and Exchange in table FundPriceDetails where isincode = 'ES06139009N6' ,'GB00BYMT2284' ,'GB00BYNFF262')
I have the mappings of isin to Exchange in the query below.Need to add another column that will do isin to SecurityCode AS WELL
SELECT x.* FROM (SELECT 'ES06139009N6' AS lsin, 'MAD' AS col2 UNION ALL SELECT 'GB0002634946', 'LSE' UNION ALL SELECT 'SG1L01001701', 'SGX' ) x JOIN FundPriceDetails fpd ON fpd.lsin = x.lsin; How would update the table with these values