on 05-21-2020 1:00 AM
On trying to create the view, I am getting error 'duplicate column name: PXX_ID'. I cannot do an inner join as most of the data in the 2 columns I am joining on don't match and I still need all of the data. Now, I understand this can be avoided by putting aliases for the column but that would make my situation difficult as I have almost 100 tables to be put into the view out of which some will have multiple matching columns and I am already using dynamic SQL to make it work
Is there any other way I can retain all columns from both tables and still save it in the view?
This question is only part of the problem. The OPs other question https://answers.sap.com/questions/13054080/is-there-a-way-to-create-a-dynamic-flat-file.html gives more insight into what should be done.
I answered that in more detail, so here is just the link to it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
the column is coming from the result of table A and also table B. Both are
Virtual tables where a ‘*’ is being used. To get around this you will need to list out all columns from A or B and rename one of the PXX_ID columns.
For instance:
select PXX_ID as PXXX_ID from E_STG;
Mark
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.