The problem is:
select (..)
UNION
select (..)
Result is:
Col1, Col2, Col3
Val1 Text1 Data
Val1 Text2 Data
The problem is that i need to save only 1 row of this two. Col2 value is not same at fact, but the same in business logic.
So, how to get result like this:
Col1, Col2,Col3
Val1 Text1 Data
OR
Col1, Col2, Col3
Val1 Text2 Data
Thank you!
UNIONbut aJOIN. Maybe aFULL OUTER JOIN?UNIONis doing exactly what it's supposed to be doing here; return each distinct row. Those rows are distinctly different, soUNIONreturns both.