473,432 Members | 1,295 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,432 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 1959
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

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.