I am facing following issue:
I had Tables
- A with columns: [ID, Name]
- B with columns: [ID, Name]
Now I want to UNION those two table with the Table result C:
C with columns [ID, Name, Source]
The Source column in Table C will shows value "A" or "B" to illustrate the source of that line is from Table A or B.
I tried some guides with
(SELECT *, "A" AS SOURCE FROM A) UNION ALL (SELECT *, "B" AS SOURCE FROM B)
But It still seems wrong!
Note: This is for SAP HANA. How I can do now ?