Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create a table from two other tables. 1

Status
Not open for further replies.

Crewdawg

Technical User
Oct 29, 2005
30
US
I need to create a table based on the structure and data in two other tables. These source tables both contain the same structure. I have tried the query as follow, which results in a syntax error:

Code:
DROP TABLE COMB_LABOR
CREATE TABLE COMB_LABOR
AS (SELECT 8 FROM "GDB_01_8"."DBO"."WOMNT_LABOR", "GDB_01_8"."DBO"."WO_LABOR");

Code:
Server: Msg 156, Level 15, State 1, Line 2
Incorrect syntax near the keyword 'AS'.

I have had little luck getting joins to assist me. I have used the DTS Import / Export wizard as well. Until I can figure out what I am doing incorrectly with joins this seems like a temporary solution (while less efficient).



----------------------------------------
Multithreading is just one thing after, before, or simultaneous with another.
 
Now how to I make this a stored procedure and execute it?

Sean H

----------------------------------------
Multithreading is just one thing after, before, or simultaneous with another.
 
Thanks a bunch. Worked great.

----------------------------------------
Multithreading is just one thing after, before, or simultaneous with another.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top