SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Appending two tables
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

masond
Constraint Violating Yak Guru

447 Posts

Posted - 08/13/2013 :  05:28:31  Show Profile  Reply with Quote
Aim – Append the results from #tablecut on to table #Deletedupes

Table name #tablecut
Columns within #tablecut
Records = 186
Fdmsaccountno
Seller_Code
mcc_code
chain_chain_no
Dba_name
se_number
pca
post_code
rolling12
Segmentation


Table name# #Deletedupes
Columns within # Deletedupes
Records = 11195
Fdmsaccountno
Seller_Code
mcc_code
chain_chain_no
Dba_name
se_number
pca
post_code
rolling12
Segmentation

End result 11389 records
Put into a table called #Results

Would appreciate any help available

bandi
Flowing Fount of Yak Knowledge

India
2170 Posts

Posted - 08/13/2013 :  06:36:59  Show Profile  Reply with Quote
SELECT *
INTO #Results
FROM (SELECT * FROM #tablecut
       UNION ALL
      SELECT * FROM #Deletedupes ) T


--
Chandu
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000