Home All Groups Group Topic Archive Search About

dynamic aliases /columns ?

Author
12 Aug 2005 4:45 AM
romy
Hi

Is it possible to return a table that its aliases are changing according to
varaiables ?
For example:  I would like to use something like (ofcourse it doesn't work).


declare @p1,@p2 varchar(30)
set @p1 ='blhablha'
set @p2 ='hghfg'

select field1 as @p1, field2 as @p2 from table1

thanks

AddThis Social Bookmark Button