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.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Get Column aliasis from Select Query

Author  Topic 

khushi2005
Starting Member

2 Posts

Posted - 2008-07-29 : 11:56:19
Is it possible to get Column Aliasis from a Select Query

Like

Select col1,col2 ,Col3 as (Select ColNew from Table2)
From Table1

If not how do I chnage the name of the Column in a TempTable

Thanks

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-07-29 : 11:57:44
didnt get what you're asking for. do you mean you're storing alias names in another table as value and want to retrive the name from it?
Go to Top of Page

Lamprey
Master Smack Fu Yak Hacker

4614 Posts

Posted - 2008-07-29 : 12:17:36
The only way I know how to do that is with dynamic sql.
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-07-30 : 04:00:25
quote:
Originally posted by khushi2005

Is it possible to get Column Aliasis from a Select Query

Like

Select col1,col2 ,Col3 as (Select ColNew from Table2)
From Table1

If not how do I chnage the name of the Column in a TempTable

Thanks



Why do you want to do this?

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

VGuyz
Posting Yak Master

121 Posts

Posted - 2008-07-30 : 04:03:30
Cant get u..
Go to Top of Page
   

- Advertisement -