473,799 Members | 3,329 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to convert rows to clumns

1 New Member
I have (large)datatabl e than (example)
id car value
1 car1 Valx
1 car2 122
1 car3 22
.
2 car4 val
2 car2 val
.
3 car& val


i want result than
id car1 car2 Car3...carx
1 val val............ .
2 val val............ .
3 ............... .
May 3 '12 #1
2 1816
RhysW
70 New Member
http://aspalliance.com/538_CodeSnip_...rizontally.all

This page gives a very detailed tutorial on how to have is set so records are viewed in the way you want, you may have to click, view etire article, its the last two headers that explain it. essentially you manually replace each record into the right place in a special bound datagrid. the tutorial really explains it better than i ever could
May 3 '12 #2
Rabbit
12,516 Recognized Expert Moderator MVP
You mentioned a database. Some of them have PIVOT functionality in their SQL implementations . Find out if yours has it and what the syntax is for it.
May 3 '12 #3

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

Similar topics

3
4788
by: ambersaria420 | last post by:
Hi All, I need to help with converting rows to columns in SQL2k. Input: Id Name Role 58 Ron Doe Associate 58 Mark Bonas Doctor 59 Mike Johnson Doctor
1
6075
by: blah1234 | last post by:
Is there anyway in DB2 to convert rows to columns? In other words, if I have the following table below... MemberID AccountNum ZipCode ------------------------------------ 1234 1 45645 1234 2 45647 1859 1 36363
0
1887
by: helpful sql | last post by:
Hi all, I am using an HTML table control on my ASP.Net page. Now I need to change this table so that columns become rows and rows become column. Since the table is very complex with many controls in them, I am wondering if there is any way to do this in visual studio 2003 or using any other tool. Thanks in advance.
0
338
by: ggnanaraj | last post by:
I have the following table contents: MONTH STATES ----------- ---------------------- 1 5177 2 640 3 6029 4 11086 5 2131
2
2159
by: Jeremiah | last post by:
I have a database with monthly data for each client, each row another month. How can I convert these rows into colums, in order to have 1 row per client? Example: Client A 1 2354 Client A 2 4584 Client A 3 10112 Client B 1 1245 Client B 2 3556 Client B 3 2222 ...
9
101444
by: dotnetguru | last post by:
Hi SMART GUYS, Please help me write a query. Actually I want to convert my rows into columns. Can anyone kindly give me the query to do it? My rows are about employees. There can be any number of employees (in the following table I have 3 employees ABC, EFG, WRI) with any number of records for each employee (there can be 20, 30 records each), but all employees have the same number of records (in the following table each employee has 3...
1
6597
by: abbaskhan | last post by:
Actually i am working on some reports for that i need my rows to convert into columns. If we can please send me the code
3
1630
by: pushkaraj | last post by:
hi, I have a text file containing 2 rows of data points ....these data points are separated by 4 spaces in between and there are n number of such points where n can be 200-500.....i want a new text file to be created such that these 2 rows get converted to 2 columns( i need this file as a input file for gnuplot)......can anybody please help me in writing the code in vb....i have used vba in autocad and am a complete newbie ............please...
2
1942
by: kirankumarn | last post by:
How to convert rows into different columns Thanks in advance
1
2370
by: soniamehra | last post by:
I hv a data in this form ParID TimeStamp Scale Value 1 8/9/2007 10:48:46 AM 10 1500 2 8/9/2007 10:48:46 AM 10 1610 3 8/9/2007 10:48:46 AM 10 1640 4 8/9/2007 10:48:46 AM 10 1580 5 8/9/2007 10:48:46 AM 0.1 219.2 6 8/9/2007 10:48:46 AM 0.1 332.6 7 8/9/2007 10:48:46 AM 0.1 219.3 8 8/9/2007 10:48:46 AM 0.1 257
0
9687
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10485
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10252
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10027
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9073
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6805
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5585
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3759
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2938
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.