I need to update the column (vendor_type) in the table depending on values in other columns.
Table name = "vendor"
Columns = "client_id"(varchar), "coach_id"(varchar), "exm_vendor"(boolean), "vendor_type"(varchar)
And this is what I want to do with postgresql:
if (client_id != null)
vendor_type = INTERNAL
else if (coach_id != null)
vendor_type = VENDOR_COACH
else if (exm_vendor == true)
vendor_type = EXM
else
vendor_type = EXTERNAL