Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Development - SQL Server 2014 » Latest topics
Viewing all articles
Browse latest Browse all 3145

Copy/Insert Data to another table with different number of columns

$
0
0
Hello guys,This would be me example. I have some query and my final table looks like:[quote]|Country|Region|Mark|RW|December 26, 2015|January 2, 2016|January 9, 2016|... etc.[/quote]Also I have and second table where I need to copy the data from first table and this one looks like:[quote]|Country|Region|Mark|RW|January 3, 2015|January 10, 2015|January 17, 2015|....|December 26, 2015|January 2, 2016|January 9, 2016|...[/quote]and I have to copy, exactly, December 26, 2015 (from first) to December 26, 2015 (in second) and so on and so forth.I have tried with INSERT INTO, INTO...but every time got some error (the tables are not the same or something like that)Any idea how to make this?Thank you in advance.

Viewing all articles
Browse latest Browse all 3145

Trending Articles