473,417 Members | 1,377 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,417 software developers and data experts.

Multi row to one row separate column also

Now i have a MSSQL table, Material

The fields are as below,

Type, Mat_Name, Size1, Size2, Size3
A, Wood, 100, 100, 100
A, Iron, 200, 200, 200
A, Steel, 300, 300, 300
B, Plastic, 400, 400 ,400
B, Ore, 500, 500, 500
B, Glass, 600, 600, 600

Can i display them as below?

A, Wood, 100, 100, 100, Iron, 200, 200, 200, Steel, 300, 300, 300
B, Plastics, 400, 400, 400, Ore, 500, 500, 500, Glass, 600, 600, 600

Seeking help from publics, thanks
Oct 16 '13 #1
2 1365
Rabbit
12,516 Expert Mod 8TB
Your thread has been moved to the SQL Server forum.

Not easily. Depending on what version of SQL Server you have, you can use XML path or you will need to use a cursor.
Oct 16 '13 #2
ck9663
2,878 Expert 2GB
Here are some options...

Good Luck!!!


~~ CK
Oct 16 '13 #3

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

Similar topics

0
by: Michelle Stone | last post by:
I have several Data Adapters, and depending on certain conditions, I set one of them as the DataSource for a datagrid on my web form. In each of the data adapters, I have the primary key of the...
0
by: Ted Timmons | last post by:
The text in my column headers is too long to fit on one line. Is there a way to make the column headers wrap to more than one line? Presently the text is cut off at the preset column width.
1
by: J L | last post by:
Is it possible to create multi-line column headers for the listview control? If so, how? TIA, John
5
by: bobwansink | last post by:
Hi, I'm relatively new to programming and I would like to create a C++ multi user program. It's for a project for school. This means I will have to write a paper about the theory too. Does anyone...
2
by: Marco | last post by:
Is there a way to get the text in a column header to wrap to multiple lines? I'm using vb.net 2003.
2
by: manonbar | last post by:
I have a radiobuttonlist bound to a dataset on the Page Load event, it has about 150 items. I used two columns from my SQL Server database, ItemVal for the DataValue field and ItemText for the...
6
by: gunanallasamy | last post by:
hi Folks, i came across a situation for which still i couldn't get a solution. i have table like below(some other columns are also there) option value -------...
3
by: tc3driver | last post by:
Hello Folks, I have an interesting problem, let me start off with, this database is not of my design, is an absolute mess, and there is nothing I can do about it. SELECT...
1
by: Nishant Gaurav | last post by:
Hi All, Here is the scenario i want a solution for. i have two columns col1 and col2 which needs to access the result of same table whose col(say time col) is required for fetching the result....
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: 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
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
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...
0
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
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
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...

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.