Aug 09 2023 10:05 AM
Assuming I have a two table containing the following information:
Table 1:
Field1 | Field2 ===================== ABC | NULL NULL | DEF
Table 2:
Field3 | Field4 ===================== ABC1 | ABC2 NULL | DEF2
DEF4 | DEF3
is there a way I can perform a selection on the tables to get the following Table:
Field1 | Field2 | Field3 | Field4 ========================== ABC | NULL | ABC1 | ABC2
NULL | DEF | NULL | DEF2
NULL | NULL | DEF4 | DEF3
Thanks
Aug 09 2023 10:22 PM
@Paata1966 , the requirements on the result are unlogical and unlogical is difficult to implement in SQL
Why is table1, field2 = "Def" only once included in the result? Unlogical.
Aug 10 2023 02:00 AM - edited Aug 10 2023 02:06 AM
@olafhelper Thanks for the answer, I think it's logical enough, I solved the problem using ROW_NUMBER and LEFT JOIN
Aug 17 2023 01:06 AM