Concat string to field in multiple collections

45 views Asked by At

I have several collections within the same database: assessments_1, assessments_2, assessments_3, assessments_4 ect Each of the collections has an existing fields titled "test_name" and "vendor". When vendor = "Bridge" and test_name = "Tabulation", I would like to concat "EM - " to the beginning of the test_name field so it becomes "EM - Tabulation".

I've looked though the mongoDB manual on concat, but there are no references to update across collections.

I'm on MongoDB 4.4.4. Using Studio3T.

0

There are 0 answers