sql - Update value based on a value in another table -


tried various different options , running road block.

i have 2 tables. every time stringvalue 'minor' in customefieldvalue table want update priority 4 in issue table.

update issue set priority = '4' customfieldvalue customfieldvalue.stringvalue = 'minor'; 

i assume tables related in way, let's on issueid field. this:

update issue set priority = '4'  issueid in (select issueid customfieldvalue stringvalue = 'minor') 

you want condition in clause in nested query narrow down custom field 1 after rather custom field value 'minor', like:

where customfieldname = 'priority' , stringvalue = 'minor' 

and if going running time, should filter out ones have correct value in main clause:

where priority <> '4' , issueid in (... 

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -