Microsoft
Software
Hardware
Network
Question : Create a "duplicate record" with one different value in a column
I have an sql 2008 server. One of my databases has a table named tblRegistration. This table has a list of youth in it.
There is are two columns called Fiscal and Redetermination. The Fiscal column has '2010' in it, but now the fiscal year is over so I need to keep these old records and copy over new ones.
I am telling our employees to enter an 'X' in the column called Redetermination if they want to see these records moved over to the new fiscal year.
How can I write an sql statement that will copy all the records that have an 'X' in the Redetermination column and create a duplicate record with a new Fiscal Year of '2011'?
Thanks for you help!
Answer : Create a "duplicate record" with one different value in a column
Try:
INSERT INTO tblRegistration
(Fiscal,Redetermination)
SELECT
2011,
Redetermination
FROM
tblRegistration
Where Fiscal= 2010 and Redetermination = 'X'
Random Solutions
Why domain admin can not use mstsc to the DC after I added a user to remote desktop group?
What is Windows Server 2008 FE
if sentence returns weired value
How to find out which exchange server a remote user is using?
Joining Mac OS X Version 10.6.4 to windows server 2008's Active Directory
How to create a Group Policy in SBS 2008 server - to allow users admin access to local computers ?
How do I quickly get my Exchange 2003 OWA to get set up with an SSL Cert?
Buying and Upgrading office 2007 to 2010
Email
Pictures in Form with columns