Skip to content
Advertisement

Update column based on existence in another column

I have two SQL tables. I am trying to conditionally update the second based on detecting existence of a value, URL in the this example, in the first.

The first table, Applications, has the following data:

In the second table, Modernize, I have the following data:

The expected result would be if a URL is detected in the first table, Application, that in the FieldToUpdate it would set the text “Yes”. Otherwise, it would set FieldToUpdate to No.

Advertisement

Answer

Use join:

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement