.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> ASP.Net >> Post New QuestionBookmark and Share Subscribe to Forum

doubt in sqlserver

Posted By: Naresh     Posted Date: October 08, 2010    Points:2   Category :ASP.Net
Hi All,


If i use below statement in sqlserver i will get header as HeadCount and its value as First Value.

Select 'First Value' as Headcount

Under Headcount i should have 5 values like below in sqlserver

HeadCount
FirstValue
SecondValue
ThirdValue
fourthValue



Responses
Author: Syed Shakeer Hussain             
Posted Date: October 08, 2010     Points: 5   

Hi Naresh ,

What is the Problem with the Query.You didnt post it?

Author: Santosh             
Posted Date: October 10, 2010     Points: 5   

Hi Naresh

i m not clear abt ur doubt...........

Regards
Santosh

Author: Sajid P K             
Posted Date: October 11, 2010     Points: 5   

Hi Naresh,

Your looking this... if not let me know the qustion ?


Select 'HeadCount' as  HeadCount
union
Select 'FirstValue' as HeadCount
union
Select 'SecondValue' as HeadCount
union
Select 'ThirdValue' as HeadCount
union
Select 'fourthValue' as HeadCount



Regards,
Sajid P k

Author: Naresh             
Posted Date: October 11, 2010     Points: 5   

Hi Sajid,

Thanks a lot That's right.

Author: Ramesh P             
Posted Date: October 31, 2010     Points: 5   

Hi Naresh it is very simple

Select FirstValue as HeadCount
union
Select SecondValue
union
Select 'ThirdValue'
union
Select 'fourthValue'
union
Select 'fifthValue'

Regards,


Ramesh



Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend