[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 116
  • Last Modified:

copying one row to another

I have a table named tblOrgRegistrations

I have a column named CDTESType and I want to transfer the data in this column to a column named SubGroup in the same table where the Agency column = CDTES

Is this correct below

UPDATE tblOrgRegistrations
SET SubGroup = CDTESType where Agency = 'CDTES'
0
al4629740
Asked:
al4629740
3 Solutions
 
nemws1Commented:
Looks correct.  Back up your database and try it. :)
0
 
Dany BalianCTOCommented:
yes, it's 100% correct as long as both data types are similar!
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
it's correct if it's the same row.

to copy from 1 row to another row, you will need to "update with join" with the same table, read up here:
http://www.experts-exchange.com/Database/Miscellaneous/A_1517-UPDATES-with-JOIN-for-everybody.html
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now