I'm looking the best way to "flatten" the first three record's values into fourth record (as shown). The values will be text, and each record will only ever have one value in one of the value columns. Also, one account number may have one or even multiple records like the example. Thanks.
Note: I have seen a few other topics related to my question, but they aren't quite the same as mine:
Sql Merging multiple records into one record
Merge multiple records into one row in a table
AcctNum|Val1|Val2|Val3|
1 |x | | |
1 | |y | |
1 | | |z |
1 |x |y |z |