I have code values in 5 diffrence column, and I want to put them in one column (mutiple row with same ID).
How could I do this?
ID Column1 column2 column3
A12B Code1 Code2 Code3
turn to:
ID Column
A12B Code1
A12B Code2
A12b Code3
A crude solution would be to create 5 queries and then union them together - I would only do this if the number of code columns is known to be fixed and will not change.
Also, this assumes that each of the code columns are the same data type.
Each query would have the ID and one of the code columns as follows:
Query1:
ID, C1
Query2:
ID, C2
etc..
Then, union the 5 queries together and the resulting query will have your required output.
You will need to determine based on your use case if you need union or union all functionality.
Hope this helps,
Adam.
Thank you!