Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Move data from one column to another column in the same table.

Posted on 2004-10-11
2
Medium Priority
?
197 Views
Last Modified: 2012-06-27
I want to move the contents of a column RelatedMoveID to a column named RelatedInventoryID in a table named Tbl_Movements. Could you help me with what I assume will be an update query? Current values in RelatedInventoryID are all <NULL> and RelatedMoveID will be empty and Nulls are allowed.
0
Comment
Question by:jamesh1031
2 Comments
 
LVL 70

Expert Comment

by:Scott Pletcher
ID: 12276333
UPDATE Tbl_Movements
SET RelatedInventoryID = RelatedMoveID
0
 
LVL 10

Accepted Solution

by:
AustinSeven earned 2000 total points
ID: 12276364
update Tbl_Movements
set RelatedInventoryID  = RelatedMoveID,  RelatedMoveID = NULL

AustinSeven
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have a large data set and a SSIS package. How can I load this file in multi threading?
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

886 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question