Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
VipinMitta
Starting Member
12 Posts |
Posted - 2010-03-12 : 02:56:22
|
| Dear experts,i want to assign value of column as other column namesuppose i have one tablecreate table a(id int identity, b_name varchar(100), create_time datetime )insert into avalues('abc',getdate())select * from aresult is id b_name create_time1 , 'abc' , '12/03/2010'but i want id name_on_12/03/2010 create_time1 , 'abc' , '12/03/2010'is there any solution for this please let me knowthanx in advance |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2010-03-12 : 03:02:31
|
search for dynamic sql.without it is not possible. No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
namman
Constraint Violating Yak Guru
285 Posts |
Posted - 2010-03-12 : 22:31:45
|
| what you want for the column name if there are more than 1 rowid b_name create_time1 , 'abc' , '12/03/2010'2 , 'def' , '5/5/2010'what you want for red columnid name_on_ create_time1 , 'abc' , '12/03/2010'2 , 'def' , '5/5/2010' |
 |
|
|
|
|
|
|
|