Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copy data to different field, same table 1

Status
Not open for further replies.

MagicGirl

MIS
Jan 14, 2002
45
US
Hello, I have a situation where I would like to copy or move data from one field to another on the same table (same data type). I am having trouble with the info from the sources I am using; "Teach Yourself SQL" will only go so far! I have located a wealth of information on this forum on moving data from table to table, but have yet to find something specifically referencing a within-table copy or move. This is a one-time process to correct an error, not something which needs to be automated during data entry. Any help would be extremely appreciated! Thanks!
 
Hi,

Try this...

UPDATE TBL SET NewFldname = OldFldName

Hope this is what u r looking for...

Sunil
 
Thanks for your quick reply, Sunil! - before I try it, will this copy the data, or move the data?

Susan
 
Hi,

It will update the new column name u want to update from the old column name, so basically both the fields will have same values after u execute the above statement....



Sunil
 
Hi, Sunila,

Thanks again - this worked perfectly! [medal]

Susan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top