Forum Discussion
Merge queries
- 9 years ago
One of the matching columns doesn't have any data i.e 'blank' . I removed that column from the table itself and then joined them . After that even though I am including that column I am still getting the desired output(no duplicate columns fromn the same table),surprising isn't it.
Tools works in weird way some time. Can't believe I spend so much time on this and still dont know the root cause even though I am getting desired results.
Now I am getting the desire output. But before that when I was merging the trwo queries ,instead of getting columns feom two table Iwas getting columns from primary table and repeated columns from secondary table ,i.e 2 time the same column.
Suppose
Table A(Primary table) has a,b,c columns and
table B is the secondary column and I have col1,col2,col3 in thi table. I was getting total 6(a,b,c,col1,col2,col3,col1,col2,col3) columns in the merge query which is not right.
Hi Ankit041,
Glad to hear that you have got desired output. So, how did you resolve this problem?
Regards,
Yuliana Gu
- GilbertQ9 years agoSuper UserHi there I think it might be getting a better understanding of what the Merge is doing?
Once you have that understanding you can then use it so that it will work in the way that you understand, as well as know how to fully utilize it going forward.
What I would suggest is to Google Joins for Databases, which will explain the different joins and what they do. - Ankit0419 years agoFrequent Visitor
One of the matching columns doesn't have any data i.e 'blank' . I removed that column from the table itself and then joined them . After that even though I am including that column I am still getting the desired output(no duplicate columns fromn the same table),surprising isn't it.
Tools works in weird way some time. Can't believe I spend so much time on this and still dont know the root cause even though I am getting desired results.