473,405 Members | 2,445 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Changing Rows to Columns

Hi All,

I am trying to convert a table of data into columns (like you can in EXCEL using the copy and paste as 'transpose' button)

I have the below data:

Code Day Shift
502025 Monday Rostered
502025 Tuesday Rostered
502050 Monday Not Rostered
502050 Tuesday Rostered


And would like to make it look like this:

Code Monday Tuesday
502025 Rostered Rostered
502050 Not Rostered Rostered

Thanks!!
Dec 7 '10 #1
2 1958
Hello,

Please, could you have a look on this link ?
http://msdn.microsoft.com/en-us/library/ms140308.aspx
or
http://blogs.msdn.com/b/craigfr/arch...-operator.aspx
or
http://msdn.microsoft.com/en-us/libr...=SQL.100).aspx
it is a feature which appeared with SQL Server 2005 , which is difficult to find in the SQL Server Book On Line

Have a nice day
Dec 8 '10 #2
meabi
4
Explained here , comment if needed
http://www.meabi.com/changing-a-colu...-a-row-in-sql/
Dec 12 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: David Wender | last post by:
I want to create a dataview with a sort on multiple columns. However, when I use FindRows, I only want to search some of the columns, not all. Is this possible? I have not been able to make it...
2
by: J055 | last post by:
Hi I've been looking into different ways of formatting columns/rows in the GridView control. I realize now, I think, that once the datasource is bound to the control the original column type...
1
by: pinkyrose | last post by:
Hi there, i need some help in accessing a the ith row in a NxM array in vba. More specifically i have an NxM array called prices and i want to find the average of each row ,as well as the mean...
7
by: lethek39 | last post by:
Hey I have been trying to figure out how to sum rows and columns in a matrix square. I also have been trying to get the program to list the numbers of the diagonal in the matrix. So far this is the...
3
by: Rambaldi | last post by:
Although i'm working on ASP.net, i think the problem i'm facing is related to my javascript function so i hope i create the thread in the right section. My goal is to create a table dynamically,...
0
by: yoav.sagi | last post by:
hi, i am Inheriting from TableLayoutPane with a designer that inherits from ParentControlDesigner ..i would like to allow the user to resize the columns and rows ..All rows and columns SizeType =...
6
by: viki1967 | last post by:
Hi all. I need your help. I realize this script and I do not know where to begin: 1) A simple grid rows / columns. 2) The first column contain an input type = "checkbox" 3) When select...
3
by: ronakinuk | last post by:
how can i unhide rows/columns in excel 2007
0
by: Rakeshashapur | last post by:
hi, i'm using grid view in vs 2008. i want to inter chang the columns by drag and drop.(similary to reordered list extender of Ajax control tool kit). please any one explain me how to do this. (if...
1
by: nawedita | last post by:
Hi everyone how i add and delete rows,and columns(textbox,dropdown) dynamically onclick button and store data in database with insert,update,delete record.that support all browsers.Because i am...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.