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

How to split a row data in to multiple row bases on the column value

1
Hi All,
I am looking for the recursive function in C# for spliting the single row data into multiple row,
I have a data table in C# and the table contents data like
column --> :| A | B |C |D
---------------------------------------------------
Row 1 :|5,8,10-20 | 15 |7,10 |20,30
Row 2 :|30 | 16,18,20-25 |11,13 |35
---------------------------------------------------

I want to spit above data in to multiple row for example
Row 1: of the above table needs to split in below multiple rows shown below,
5,15,7,20
5,15,7,30
5,15,10,20
5,15,10,30
8,15,7,20
8,15,7,30
8,15,10,20
8,15,10,30
10-20,15,7,20
10-20,15,7,30
10-20,15,10,20
10-20,15,10,30
Row 2: of the above table needs to split in below multiple rows shown below,

30,16,11,35
30,16,13,35
30,18,11,35
30,18,13,35
30,20-25,11,35
30,20-25,13,35

Please advice
Thanks in advance.
Jul 16 '10 #1
0 1527

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

Similar topics

1
by: gotcha | last post by:
I need to be able to split data such as this in a line: Part A23423 Price 45.00 into just this A23423 and put that into a form field that I can post. I have the following code, but I can't...
0
by: Amber | last post by:
There are times when you will need to highlight or otherwise modify the contents of a particular DataGrid row-column value based upon the value in the column. In this example we will select the...
1
by: kcakebread | last post by:
Using VB 2005, I have a strongly typed dataset (from a .xsd file in my project). When I load data into this dataset, the immediate window shows: ?ds.TableX(0).IstheFieldNull True So,...
0
by: neeraj | last post by:
Hi Everybody Is any body suggest me how can I get all cell value together(without looping), from single column of datatable in asp.net like this "Datatable.row (0).ItemArray" This returns all...
1
by: =?Utf-8?B?R3JlZyBMYXJzZW4=?= | last post by:
I'm populating a datagridview from a data table. I would like to set the back ground color of each row based on a column value in that row. If the value of a column for a particular row is set...
4
by: =?Utf-8?B?QmFidU1hbg==?= | last post by:
Hi, I have a GridView and a SqlDataSource controls on a page. The SqlDataSource object uses stored procedures to do the CRUD operations. The DataSource has three columns one of which -...
0
by: Joe Meng | last post by:
Greetings, I've seen this question asked and answered here, just not completely yet. I'm wondering how to use a column value as a table name in another query. So far it's looking like you must...
3
by: Manikandan | last post by:
Hi, I have table with three columns as below table name:exp No(int) name(char) refno(int) I have data as below No name refno 1 a 2 b 3 c
0
by: Miles | last post by:
On Mon, Sep 15, 2008 at 6:06 AM, Harish K Vishwanath <harish.shastry@gmail.comwrote: "built-in type" generally means "implemented in C", also sometimes called "extension type". Both the...
13
by: chromis | last post by:
Hi, I have a query which updates the projects table of my database, however when I try to run my query with blank values i get the following error: Data truncation: Data truncated for column...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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,...
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...

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.