Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 sql server 2000

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-05-07 : 09:59:08
phanendra writes "How can I copy a data from the already exists data. As I need copy only a few columns for large number of rows. But the tables are different but the columns have same data types. I need a query for that

thanking you
H.Phanendra"

YellowBug
Aged Yak Warrior

616 Posts

Posted - 2002-05-07 : 10:23:05
Without the exact code I can only suggest something like:

INSERT INTO SmallTable (Field1, Field3, Field20)
SELECT fielda, fieldb, fieldc FROM BigTable

Basically, you need to specify the column names in the INSERT statement to map the source and target fields.

HTH
Go to Top of Page
   

- Advertisement -