Member since
02-28-2017
1
Post
0
Kudos Received
0
Solutions
02-28-2017
11:57 AM
Yes There is a way..... Take a look at following working query and modify your code accordingly to generate like queries. Consider a table XYZ with columns ID,CF.RISK : UPSERT INTO XYZ(ID,CF.RISK SELECT ID,(CASE ID WHEN '12341e65-a68b-4f88-93ce-33dd94497a6d' THEN 'MEDIUM_RISK' WHEN '73f41e65-a68b-4f88-93ce-33dd94497a6d' THEN 'HIGH_RISK' ELSE 'LOW_RISK' END) FROM ACCOUNTS WHERE ID IN('12341e65-a68b-4f88-93ce-33dd94497a6d','73f41e65-a68b-4f88-93ce-33dd94497a6d') It updates column CF.RISK for all ID's in WHERE clause list. , Yes there is a way; Take a look at following working query and modify your code accordingly:
Consider a table XYZ with columns ID,CF.RISK; UPSERT INTO XYZ(ID,CF.RISK SELECT ID,(CASE ID WHEN '12341e65-a68b-4f88-93ce-33dd94497a6d' THEN 'MEDIUM_RISK' WHEN '73f41e65-a68b-4f88-93ce-33dd94497a6d' THEN 'HIGH_RISK' ELSE 'LOW_RISK' END) FROM ACCOUNTS WHERE ID IN('12341e65-a68b-4f88-93ce-33dd94497a6d','73f41e65-a68b-4f88-93ce-33dd94497a6d')
... View more