how to write a SQL to combin two tables ,and insert into another table??

how to write a SQL to combin two tables ,and insert into another table(as follow)?

[table a] + [table b] ===>[table c]

[table a]
name date val1
-- ---- ---
User1 2004-04-01 12.0

[table b]
name date val1
-- ---- ---
User1 2003-12-29 25.59
User1 2003-12-30 10.42
User1 2003-12-31 51.40
User1 2004-01-01 23.30
User1 2004-01-02 22.01
User1 2004-01-03 23.85
User1 2004-01-04 19.51
User1 2004-04-08 224.78
User1 2004-04-09 183.32
User1 2004-04-11 31.84

[table c]
name date val1
-- ---- ---
User1 2003-12-29 25.59
User1 2003-12-30 10.42
User1 2003-12-31 51.40
User1 2004-01-01 23.30
User1 2004-01-02 22.01
User1 2004-01-03 23.85
User1 2004-01-04 19.51

User1 2004-04-01 12.0

User1 2004-04-08 224.78
User1 2004-04-09 183.32
User1 2004-04-11 31.84
[936 byte] By [liuty] at [2007-11-18 19:28:30]
# 1 Re: how to write a SQL to combin two tables ,and insert into another table??
Create the 3rd table and use 2 INSERT...SELECT statements. (This is probably SQL Server specific, but I am not sure). Also prefer to post DB questions in the DB forum
panayotisk at 2007-11-11 1:17:08 >