C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » SQL Server »

How to display one column in different ways


Posted Date: 02 Nov 2009      Posted By: halitth      Member Level: Bronze     Points: 1   Responses: 3



Hello friends,

I am using 2 tables, that are IT_Experts and IT_Category, The IT_Experts contains id, Name, email, consultskill1, consultskill3, consultskill3 and the IT_Category contains CatId, Catname, log. And i displyed the follwing query:

"Select e.Id,e.Name,c.CatName from IT_Experts e join IT_Category c
on c.CatId = e.consultskill1 order by e.Name"

And i want to display the 3 consultskills using the same Catname. what to do.
please send urs suggestions.......





Responses

Author: greeny_1984    02 Nov 2009Member Level: DiamondRating: 2 out of 52 out of 5     Points: 2

Hi,

You can use 'AS' to achieve your functionality in sql server

for ex:

select column1 as 'counsultskills' from table1


Regards,
Greeny_1984

Rate this Response[Excellent/Good/Poor]
FRESHERS check this link
Need help from me join here



Author: Mohan    02 Nov 2009Member Level: DiamondRating: 2 out of 52 out of 5     Points: 2

Can you show the final output what you expect??

Regards

Mohan Kumar.D



Author: ABitSmart    02 Nov 2009Member Level: DiamondRating: 2 out of 52 out of 5     Points: 2

Please provide some more details with sample data expected. But looks like you need to add a group by 'c.CatName' to your query


Post Reply
You must Sign In to post a response.
Next : Default value
Previous : Uses of Coalesce function in SQLSERVER
Return to Discussion Forum
Post New Message
Category: SQL Server

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use