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
 Transact-SQL (2000)
 Select with Insert Sql Query

Author  Topic 

vk18
Posting Yak Master

146 Posts

Posted - 2006-11-13 : 16:47:38
Hello Friends,

I am trying to select the data from one table and inserting into another table. I have two tables
tblcnr and tblckr.

tblcnr
tn1
tn2
tn3


tblckr
tn1
tn2
tn3


I want to select the data from tblcnr and want to insert into tblckr. can you guys help me with query

Thx

Kristen
Test

22859 Posts

Posted - 2006-11-13 : 17:01:44
INSERT INTO tblckr(Col1, Col2, Col3, ...)
SELECT ColA, ColB, ColC, ...
FROM tblcnr
WHERE ....

Kristen
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-11-13 : 20:17:19
provided column data types are identical in both tables

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -