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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

creating tables from other tables 1

Status
Not open for further replies.

dmine

Programmer
Mar 9, 2003
2
IN
in oracle SQL a statement such as "create table temp as select * from old_table" works fine and creates a table called temp, but the same statement does not execute in MS SQL Server. any solutions? i need to create a table through a select query, such as the one explained. please post a answer soon. thanks!

also when i try to import data into excel from SQL server, it only works for tables, but the program simply hangs when i try to import data from a view. please help!
 
Dmine,
Create a view with the select statement you want. Then import that view into a table using data transformation services (DTS)
jf
 
Sorry, I guess you already tried that. The only other solution i can think of is using the DTS and then instead of selecting "Copy table(s) and view(s) from the source database"
Choose the option button "Use a query to specify the data transfer" Then put your SQL statement in thier
jf
 
dmine, correct syntax:

SELECT col1, col2, col3
INTO temp
FROM old_table
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top