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
 General SQL Server Forums
 New to SQL Server Programming
 Copy values From one field to other

Author  Topic 

Quinnox
Starting Member

3 Posts

Posted - 2005-09-08 : 07:08:35
I have a table "abc" with there fields of same data type 'x','y','z'.
'x' is the primary key for the table 'abc', what I supposed to do is to copy the values under field 'y' to field 'z' irrespective of the values already with 'z'.

look forward for your help
San

rajashekhara
Starting Member

1 Post

Posted - 2005-09-08 : 07:10:18
Hi,

How can u copy Can u Tellme
Go to Top of Page

Quinnox
Starting Member

3 Posts

Posted - 2005-09-08 : 07:15:11
Hi rajashekhara,

what I mean by 'copy' is update the field (column) 'z' with values from 'y' (column). Sorry for creating any confusion.

looking forward for your help
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-09-08 : 07:37:52
Before running this take a backup of that table
If the updation is wrong restore it

Update yourTable set z=y

Madhivanan

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

Quinnox
Starting Member

3 Posts

Posted - 2005-09-08 : 08:02:43

Thanks for your help, it works for me, thanks agian
Go to Top of Page
   

- Advertisement -