![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I'm trying to migrate a huge multi-table database (created far too complex for its own good) into a three-table database, because it only needs three tables. To do this, I am hoping to use JOINs to gather all the information I need and INSERT it into a new database table (in MS SQL 2008 R2). I can get the SELECT statement and JOIN to work properly and return the results I need, but how to I "channel" the query results into a new table with the columns returned by the SELECT? This is my current query: SELECT * FROM Shipping_Info JOIN Customer_Info ON Shipping_Info.Customer_Id = Customer_Info.Customer_Id ) This returns a bunch of columns (Customer_Id, Order_Id, ST_Address1, etc) and the relevant data in the query results but what I need to end up with is a table with the columns/data returned by the query. How do I go about this? What I've read on Wiki and via Google hasn't helped much so far. Knowing the answer will help and if you have any recommended reading for me I'd greatly appreciate it, I want to solve this problem but learn from it too. |
![]() |
| Thread Tools | |
| Display Modes | |
| |