I want to update a field with a value based on the count of a certain field. Table: bmprdstrItem_no comp_item_no locPARENTA COMP1PARENTA COMP2MPARENTB COMP4PARENTB COMP5
What I want to do is if an Item_no contains a component item that ends with "M" I want to update the loc to "MWP"Here is my attempt, but I know I'm way off here. Any help would be appreciated. update bmprdstr_sqlset loc = 'MWP'where (select count(right(rtrim(comp_item_no),1)) from bmprdstr_sqlwhere right(rtrim(comp_item_no),1)='M')
If get the following msg with the above codeAn expression of non-boolean type specified in a context where a condition is expected, near ')'.