I have a table that looks like this:
record | name1 | name2 | to_merge | value1 | value2 |
---|---|---|---|---|---|
1 | STEVE | null | false | 30 | null |
2 | JOHN | null | true | 43 | null |
3 | null | LAURA | true | null | 66 |
4 | JEN | null | false | 18 | null |
I want this to be the output:
record | name1 | name2 | value1 | value2 |
---|---|---|---|---|
1 | STEVE | null | 30 | null |
2 | JOHN | LAURA | 43 | 66 |
3 | JEN | null | 18 | null |
This means I want to merge the rows with a TRUE value in the to_merge field. Any help is much appreciated!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.