I have a table with the following columns:
A.KEY is unique. A.VAL1 and A.VAL2 may have any values.
Is it possible to do a SELECT UNIQUE using multiple fields from table A?
If table A has these values:
KEY VAL1 VAL2
1 A B
2 C D
3 A B
4 C D
5 A B
6 E F
I would like the select to return rows made up of unique values in both VAL1 and VAL2. It should produce the following:
I've been using this code to deal with it:
FROM (SELECT (VAL1 || '^' || VAL2) STUFF FROM A)
Is there a better way to do this? What is "The Oracle Way"?
Points will be awarded to the most elegant, correct solution.
Thanks for the help.