Swap column Names
-
Hello Friends, I've two columns i.e Name and Address Now i want to swap the column names i mean Name to be Address and Address to be Name
And the question is...?
My advice is free, and you may get what you paid for.
-
Hello Friends, I've two columns i.e Name and Address Now i want to swap the column names i mean Name to be Address and Address to be Name
Just go to your table and Rename the table fields in Design View , if you want to do it script then you can click on Generate Change Script and it will Create Script for your
Best Of Regards, SOFTDEV If you have knowledge, let others light their candles at it
-
Hello Friends, I've two columns i.e Name and Address Now i want to swap the column names i mean Name to be Address and Address to be Name
As the others said, plus you may want to use a third and temporary name to avoid a "Field name already used" error (like when swapping two variables). :)
Luc Pattyn
Have a look at my entry for the lean-and-mean competition; please provide comments, feedback, discussion, and don’t forget to vote for it! Thank you.
Local announcement (Antwerp region): Lange Wapper? Neen!
-
As the others said, plus you may want to use a third and temporary name to avoid a "Field name already used" error (like when swapping two variables). :)
Luc Pattyn
Have a look at my entry for the lean-and-mean competition; please provide comments, feedback, discussion, and don’t forget to vote for it! Thank you.
Local announcement (Antwerp region): Lange Wapper? Neen!
-
Hello Friends, I've two columns i.e Name and Address Now i want to swap the column names i mean Name to be Address and Address to be Name
how about
select Name as Address, Address as Name from table
Just create a view on it and start working .. :) :)
Abhishek Sur
My Latest Articles **Create CLR objects in SQL Server 2005 C# Uncommon Keywords Read/Write Excel using OleDB
**Don't forget to click "Good Answer" if you like to.