View Single Post

   
  #4 (permalink)  
Old 03-01-2008, 02:24 PM
Erland Sommarskog
 
Posts: n/a
Default Re: Output Column names in each Row along with the row Value

Yas (yasar1@gmail.com) writes:
> Now I can just do...
> SELECT 'FirstName', firstName, 'SecondName', secondName,
> 'Occupation' occupation
> FROM Table1
> Which would output the table I want with the values between '' showing
> up in unnamed columns.... BUT is there a better way of doing this?


That would indeed be the way to do it.



--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Reply With Quote