Skip to content
Advertisement

Update Rows Where the following conditions are true

I am attempting to overwrite a field value with the value from another table where a certain condition is true. I have mocked up my code below

Pseudocode:

My Code:

But this is returning the error:

I’m not sure where i am going wrong exactly

Advertisement

Answer

If you are looking for the team “ops”, then your query has several issues:

  • You are filtering on the employee, not the team.
  • You have a typo in the inner from clause.
  • You want a correlated subquery.

So, I think you want:

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