Advertisement

12.15.2005 at 09:37AM PST, ID: 21666041
[x]
Attachment Details

SQL Server copy row from one table to another

Asked by jhance in MS SQL Server

Tags: , , , ,

Looking for a stored procedure that will copy a row from one table to another.  The row has a unique id field called id.  If the row exists in the target the procedure should do an UPDATE.  Otherwise it should do an INSERT.

Anyone have such a thing (or at least the skeleton of that) in their toolbox?Start Free Trial
[+][-]12.15.2005 at 09:43AM PST, ID: 15491990

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.15.2005 at 09:51AM PST, ID: 15492056

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.15.2005 at 09:57AM PST, ID: 15492104

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: MS SQL Server
Tags: copy, sql, table, row, another
Sign Up Now!
Solution Provided By: Andre_Kuyt
Participating Experts: 3
Solution Grade: A
 
 
[+][-]12.15.2005 at 09:58AM PST, ID: 15492109

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12.15.2005 at 09:59AM PST, ID: 15492120

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12.15.2005 at 10:08AM PST, ID: 15492192

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12.15.2005 at 10:13AM PST, ID: 15492218

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12.15.2005 at 10:30AM PST, ID: 15492349

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32