I have 2 tables. In the first there is a list of error id and its description. This is a reference.
id_mistake description m1 a m2 b m3 c There is also a table with data, where all errors are marked in separate columns as 1 and 0.
row_num m1 m2 m3 1 1 0 1 2 0 1 1 3 1 1 0 As a result, I want to get a table where I get an error from the 1st table and all the line numbers (+ other data) from the 2nd table.
Like this:
mistake n m1 1 m1 3 m2 2 m2 3 m3 1 m3 2