home
training courses
why choose us?
solutions
support
company
LearnItFirst User Forum
Welcome Guest
Search
|
New Posts
|
Members
|
Log In
|
Register
SQL Server Forum - LearnItFirst.com
»
SQL Server Database Administration
»
General SQL Database Question & Answer
»
Display the record in column wise
Display the record in column wise
Options
Previous Topic
·
Next Topic
rameshduraikannu
Posted:
Friday, December 25, 2009 4:56:51 AM
Rank: Newbie
Joined: 12/25/2009
Posts: 1
Points: 3
Where do you live?: chennai
Hai friends
I want to display the data in column wise
the actual is look like this
Quote:
location
loc1
loc2
loc3
loc4
loc5
loc6
want to display the like this way
Quote:
location location location
------- ------- --------
loc1 loc2 loc3
loc4 loc5 loc6
i want to display 3 column and 3 row.
it is possible to display the data like this way
Back to top
Scott Whigham
Posted:
Friday, February 26, 2010 8:53:45 AM
Rank: Super Mod
Joined: 3/20/2006
Posts: 460
Points: 1,002
Where do you live?: Dallas, TX
You have two choices - a self join or a correlated subquery in the SELECT clause. Check out Course 160 - it has lots of videos that do this sort of thing.
http://www.learnitfirst.com/Course/160/Video/2332/When-to-Use-a-Self-JOIN.aspx
http://www.learnitfirst.com/Course/160/Video/2394/Correlated-Subqueries-in-the-SELECT-Column-List.aspx
Back to top
Users browsing this topic
Guest
Forum Jump
SQL Server Database Administration
- General SQL Database Question & Answer
- Backup, Recovery and Disaster Recovery
- SQL Server Security
- Integration Services (SSIS) and DTS
Transact-SQL Programming
- DML (SELECT, INSERT, UPDATE, DELETE) Questions
- Stored Procedures, Triggers, & Functions
SQL Server Scripts, Code Samples and SSMS Custom Reports
- All SQL Server Versions
- SQL Server 2005/2008
- SQL Server Management Studio Custom Reports
Customer Service
- Video Requests
You
cannot
post new topics in this forum.
You
cannot
reply to topics in this forum.
You
cannot
delete your posts in this forum.
You
cannot
edit your posts in this forum.
You
cannot
create polls in this forum.
You
cannot
vote in polls in this forum.
SQL Server 2005 DBA Training Videos
SQL Server 2008 DBA Training Videos
Watch this topic
RSS Feed
Email this topic
Print this topic
Threaded
Normal