473,626 Members | 3,322 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Duplicate rows need to identify & store in seperate DataTable usin

Hi,

I have a DataTable with several rows. Its having 20 Columns. when i click
the Insert button then i have to check the Database Rows. Whether these new
rows are already available in the Database. If its there, then i need to
seperate the Duplicate Records

Based upon 4 columns(Employe eID, ProjectName, ProjectType, StartTime --
should be activate as a Composite Primary key)

and store those duplicate records into seperate DataTable and insert the
Non-Duplicate records into the Database. I need a seperate function. Because
I have to check the duplicate records with database as well as within the
DataTable. The DataTable may have duplicate records.

Please Help.

By
Prabhu
Aug 31 '06 #1
0 2099

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
6083
by: John Steen | last post by:
This is probably a silly question to most of you, but I'm in the process of splitting off years from a large DB to several smaller ones. Some of the existing smaller DBs already have most of the data for their respective years. But some of the same data is also on the source DB. If I simply do an insert keying on the year column, and a row being inserted from the source DB already exists in the target DB, will a duplicate row be...
18
27708
by: Elroyskimms | last post by:
I have a table using an identity column as its Primary Key and two columns (table reduced for simplicity) EmployeeNumber and ArrivalTime. CREATE TABLE ( IDENTITY (1, 1) NOT NULL , (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , NOT NULL , CONSTRAINT PRIMARY KEY CLUSTERED (
6
3065
by: 6thirty | last post by:
Hi, I've created a stocktaking database using Access XP. This is indexed by two fields - part number and shelf location. I am currently inputting all the data via a form. When I have entered a record such as: part number 202354-001 location C1-01
2
100349
by: Jim H | last post by:
I am storing incoming data in memory using a DataTable. After I'm done retrieving the data I need to get the distinct rows. I tried using DataTable.Select but that doesn't work. If I have columns "col1", "col2", "col3" in my DataTable "Table1", I need to basically be able to do this: select distinct col2 form Table1 I tried doing this: DataRow ResultsRowArray = MyTable.Select("distinct col2");
4
14396
by: Vijay Pote | last post by:
Hi All, i have a datatable in which iam creating 2 datacolumns , one is SampleID and second is TestType. iam creating a datarow depending on a for loop, if the for loop goes 5 times it will insert 5 records. every thing works well, what i want is to delete the Duplicate Rows
1
3274
by: Andrew | last post by:
Hey all, I am very new to ASP.Net (and .Net in general), but that isn't stopping the boss from wanting to begin new projects in it. This latest project has me kinda stumped and after a couple days of struggling, I figure asking you all (the experts) will keep me from going down some dark and dangerous road. The project I have is a fairly simple one, in theory anyway. The gist is to create a page where the user enters an IDNumber,...
1
4561
by: Jon | last post by:
Question: does datagrid1.isSelected(i) point to the same row as datatable.row(i).delete after datagrid sorted?? I am using datagrid1.isSelected(i) to identify datatable rows that have been selected by the user Then I use datatable.rows(i).delete to delete those rows. It works fine if I have not sorted the datatable first. But if
3
1517
by: afr0ninja | last post by:
Hello, I'm dealing with some order/inventory information where I need it in summary format so I can retain it, add to it without duplicating, and just make the reporting cleaner. I'll list an example of what I'm trying to accomplish below. I'm pretty new to access, but I'm pretty well rounded with excel. I'm not sure that I could accomplish what I'm trying to do in excel even, so any ideas or suggestions would be greatly appreciated. ...
2
13463
by: Rich | last post by:
Hello, I am just checking if there is a property or technique for displaying or retrieving from a dataTable the top 1 row(s) for rows containing duplicate keys (IDs). I have to pull data from a sql server DB. The resultset contains 10 distinct rows but the keys are duplicate - like record 12345 is listed twice but distinct because some of the other data for each field is different. I only need to see one of the 2 rows for ID 12345...
0
8265
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
8196
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8364
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8504
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
7193
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...
1
6125
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5574
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
4197
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1808
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.