User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the MS SQL section within the Web Development category of DaniWeb, a massive community of 397,817 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,620 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MS SQL advertiser:
Views: 2120 | Replies: 1
Reply
Join Date: Apr 2006
Posts: 62
Reputation: Fenerbahce is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 0
Fenerbahce Fenerbahce is offline Offline
Junior Poster in Training

inser into (SQL Server 2000)

  #1  
Apr 6th, 2007
Hi,

i have 2 tables. i have 3 equal colomns in both. I want transfer all data from 1st table to another one. How can i do it?

Thanks

this doesn't work but something like this;

insert into exam (e_score, l_name, s_id)
values (dbo.assignment.e_score, dbo.assignment.l_name, dbo.assignment.s_id)
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Aug 2005
Posts: 6
Reputation: eralper is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 2
eralper eralper is offline Offline
Newbie Poster

Re: inser into (SQL Server 2000)

  #2  
Apr 9th, 2007
Hi,
You can use the below syntax:
insert into ... select


The exact sql is as follows:
insert into exam (e_score, l_name, s_id)
select e_score, l_name, s_id from assignment


Eralper
http://www.kodyaz.com
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb MS SQL Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the MS SQL Forum

All times are GMT -4. The time now is 6:39 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC