there is a table having two columns no and name
and the data is
1 A
2 B
3 C

write a query that will result a horizontal output
A,B,C

Answer Posted / miller

try using Pivot. for details follow the link
http://msdn.microsoft.com/en-us/library/ms177410.aspx link

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Stored Procedure returns data from multiple tables. How to access it in your ASP.Net code?

528


Retrieve the unique rows from table without using UNIQUE and DISTINCT keywords.

564


How to search for a string in all stored procedure in sql server?

516


What are the properties of primary key?

488


what's the difference between delete table and truncate table commands? : Sql server database administration

460






What is the maximum size of a row in sql server?

492


Do you know the policy based administration feature of sql server 2008?

556


What is bookmark link in ssrs?

108


Are null values the same as that of zero or a blank space?

550


What are logical/boolean operations in ms sql server?

523


How to create a view on an existing table in ms sql server?

557


What are points to remember while using the fillfactor argument?

505


can an order by clause be used in a creation of a view?

673


In which files does sql server actually store data?

450


What is rs.exe utility?

116