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

DataTable Complex problem

I am using asp.net 2.0 with C#.I have a DataTable which is something like this:

Code Name Address

There is no primary key. One code is repeated several times.What i want to do here is to create multiple tables from this DataTable on the basis of 'Code'(Field) that is for each unique Code a separate table.
For example if i have a DataTable like this

Code Name Address
1 jbdaj bxzbx
2 asdda fdsdsa
1 adsd fdfsdfsdf

I would like to create two DataTables like this:
DataTable1:

Code Name Address
1 jbdaj bxzbx
1 adsd fdfsdfsdf

DataTable2:

Code Name Address
2 asdda fdsdsa

I have to do it using C# code not sql.I hope my problem is understood.
Nov 12 '07 #1
0 727

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

Similar topics

0
by: Fraggle | last post by:
I am trying to create a page with some interesting functionality. I have a text box, and a drop downlist with a button. When the button is pressed I want the text box + drop down info to be...
5
by: Stimp | last post by:
This is a question I'm carrying over from a previous one I made today since I've simplified where the problem is... I have a datatable, tblFeatures, which has around 30 columns (one for each...
1
by: andrewcw | last post by:
I have just 1 table that I am updating, the SQL I use to generate the DataTable is complex using multiple tables, however when I view the fieldnames of the DataTable from the DataSet - everything...
4
by: Aryan | last post by:
Hi, I am having problem with DataTable.Select() method. I am using ASP.NET 2.0. I have DataSet which reads data from XML file using DataSet.ReadXML(). Now this dataset has various datatable,...
4
by: Adrian Parker | last post by:
We've suddenly started getting a problem with a call to clear the contents of a DataTable. This is on a live customer site that's been working fine until yesterday. As far as we know they've not...
1
by: Maxwell2006 | last post by:
Hi, I am working with strongly typed datatables. What is the most efficient way to build a new DataTAble based on the result of DataTable.Select? At this point I use a foreach loop to do the...
4
by: Tomasz Jastrzebski | last post by:
Hello Everyone, I have a GridView control bound to a plain DataTable object. AutoGenerateEditButton is set to true, Edit button gets displayed, and RowEditing event fires as expected.
2
by: am72de | last post by:
Hi all, I have a problem with the DataTable.Reset(). After resetting the DataTable the count of the DataView is no longer equal with the DataTable.Rows.Count, so the second Assert fails. ...
2
by: sylvain.ross | last post by:
Hello everybody, I have a very weird problem regarding the serialization of a class that I wrote (named DummyClass in my exemple). My class inherits from DataTable. Then I just try a dummy...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: 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: 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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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,...

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.