Quantcast
Channel: Forum SQL Server Database Engine
Viewing all articles
Browse latest Browse all 15889

Join tables that have data mixed in the columns

$
0
0

Hi everybody!

I need help of you to solve this problem:

I have three tables:

table1: id, name, class, type, case, SM, gac (124000 records)

table2: Gac, id, name, case, date (35000 records)

table 3: id, name, date (31000 records)

table 1table 2table 3

-------------------------------

id: 250000id: 250000id:250000

name: tablename: NULLname: table

class: NULLclass: NULLclass: wood

type: gardentype: gardentype: NULL

in all the record in every table id match but, the columns have data mixed between the tables (someone inserted information selecting tables in random mode)

How can I join all the data in one table avoiding duplicated record and without loosing information, replacing the NULL spaces with data (if there is data in any of the tables)

thanks for the help


Viewing all articles
Browse latest Browse all 15889

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>