I am looking to find what unique symbols are used in values of 2 table columns and I'd like to extract them in a .csv format.
I have a table with lots of names and codes and I'd like to see each unique character ever used for each column printed once on a new row.
For example, the dataset is:
_____________________
| column 1 | column 2 |
---------------------
| value 1 | value 2 |
---------------------
The CSV would look as follows when opened in Excel (ordering of the symbols isn't crucial):
column 1, column 2
a a
e e
l l
u u
v v
1 2
I know how to extract rows from a table, but not how to parse values and extract and orgranize unique characters in a csv. Does anyone know of a solution and if this can be done with SQL?
I was thinking of extracting the needed dataset in SQL and then using a different language, populating contents into string variables, converting strings to arrays of individual symbols, and then printing out the unique ones in two columns and saving this back in .csv format.