Re: Newbe question

From: Tom Moreau (tom_at_dont.spam.me.cips.ca)
Date: 04/30/03


Date: Wed, 30 Apr 2003 09:07:25 -0400

Please post your DDL in the future. Would the following work?

update MyTable
set
    Col3 = Col2
, Col2 = NULL

-- 
Tom
---------------------------------------------------------------
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada   tom@cips.ca
www.pinnaclepublishing.com/sql
"Wayne Gore" <wayne.gore@spray.se> wrote in message news:eOFebaxDDHA.2596@TK2MSFTNGP11.phx.gbl...
Hi
I have a table with 3 columns.
The first column is an ID column with identity on (seed 1).
The second column contains data that I want to move to the third column.
The data that is moved should be in the same row as before.
When the data has been moved then the second column should not contain any
data at all (but still exist).
Any ideas?
Regards
Rickard


Relevant Pages

  • Re: Newbe question
    ... >Thomas A. Moreau, BSc, PhD, MCSE, MCDBA ... >Columnist, SQL Server Professional ... >The second column contains data that I want to move to ...
    (microsoft.public.sqlserver.security)
  • Re: update table with matlab
    ... I connected Matlab with Ms sql server, and I have to insert 4 column of ... exdata = ... if I use insert command, I obtain the second column that start ...
    (comp.soft-sys.matlab)
  • Referencing combo box column
    ... Using A2003, SQL Server 2005. ... I have a combo box on a form controlled by a sproc, very simple, just ... I have another text box with a reference to the second column of the ... take the aliases away, then it displays the correct information. ...
    (microsoft.public.access.adp.sqlserver)
  • Re: Return Key (identity) on INSERT operation (SQL/ASP)
    ... hopefully he can expedite processing your full subscription. ... SQL Server MVP ... Columnist, SQL Server Professional ... Please reply to the newsgroup. ...
    (microsoft.public.inetserver.asp.general)
  • Re: Return Key (identity) on INSERT operation (SQL/ASP)
    ... hopefully he can expedite processing your full subscription. ... SQL Server MVP ... Columnist, SQL Server Professional ... Please reply to the newsgroup. ...
    (microsoft.public.sqlserver.programming)