Geeks Talk

Prepare for your Next Interview




How can we write the columns set as rows set?

This is a discussion on How can we write the columns set as rows set? within the SQL Server forums, part of the Databases category; With Out Using The Temporary tables(# tables)....


Go Back   Geeks Talk > Databases > SQL Server

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 04-23-2008
Junior Member
 
Join Date: Apr 2008
Location: Hyderabad
Posts: 20
Thanks: 1
Thanked 2 Times in 2 Posts
nageshkota is on a distinguished road
Post How can we write the columns set as rows set?

With Out Using The Temporary tables(# tables).
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 04-23-2008
Moderator
 
Join Date: Jun 2007
Location: Bangalore,India
Posts: 1,330
Thanks: 7
Thanked 120 Times in 108 Posts
debasisdas will become famous soon enoughdebasisdas will become famous soon enough
Re: How can we write the columns set as rows set?

You can try that using case statment.
Reply With Quote
  #3 (permalink)  
Old 04-23-2008
Junior Member
 
Join Date: Apr 2008
Location: Hyderabad
Posts: 20
Thanks: 1
Thanked 2 Times in 2 Posts
nageshkota is on a distinguished road
Re: How can we write the columns set as rows set?

Quote:
Originally Posted by debasisdas View Post
You can try that using case statment.

If we know the columns set then only we can use the case statement, if did not know the column set then what is the way to get?
Reply With Quote
  #4 (permalink)  
Old 04-23-2008
Moderator
 
Join Date: Jun 2007
Location: Bangalore,India
Posts: 1,330
Thanks: 7
Thanked 120 Times in 108 Posts
debasisdas will become famous soon enoughdebasisdas will become famous soon enough
Re: How can we write the columns set as rows set?

If you want to do it dynamically better to use Procedure for that .
Reply With Quote
  #5 (permalink)  
Old 04-29-2008
Junior Member
 
Join Date: Apr 2008
Location: chennai
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
dinesh_b5 is on a distinguished road
Re: How can we write the columns set as rows set?

Hi all i am new to this forum ...
Reply With Quote
Reply

  Geeks Talk > Databases > SQL Server


Thread Tools
Display Modes


Similar Threads

Thread Thread Starter Forum Replies Last Post
Identify Rows columns in datagrid control kanta QTP 8 07-31-2008 04:11 PM
Rows to columns and vice-versa tanya_j Data Warehousing 1 03-25-2008 05:49 AM
Write a SQL to print the rows horizonatally Geek_Guest SQL 1 07-17-2007 04:54 AM
How to convert rows into columns in Teradata rashnyo Data Warehousing 0 07-12-2007 12:52 AM
How do I transpose Rows into Columns? Anasuya1031 SQL 2 07-09-2007 04:37 AM


All times are GMT -4. The time now is 02:12 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Copyright © 2008 GeekInterview.com. All Rights Reserved