473,513 Members | 2,669 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Check for the Duplicates

ganeshkumar08
31 New Member
Hi SQL friends,

I friends i need to check whether the record is already available..
ie. Before Inserting and Updating which are the validations to be done.

I need a standard solution for this.

Using SELECT and WHERE clause we can able to check for the availability, but i need a standard which are followed in the company.

Can any one you please send me the query.

Thanks and Regards
Ganesh kumar V
Feb 19 '08 #1
4 1781
code green
1,726 Recognized Expert Top Contributor
The easiest way is to deny duplicates in the table settings.
But I am not sure what you are getting at.
Feb 19 '08 #2
amitpatel66
2,367 Recognized Expert Top Contributor
Hi SQL friends,

I friends i need to check whether the record is already available..
ie. Before Inserting and Updating which are the validations to be done.

I need a standard solution for this.

Using SELECT and WHERE clause we can able to check for the availability, but i need a standard which are followed in the company.

Can any one you please send me the query.

Thanks and Regards
Ganesh kumar V
Create a BEFORE INSERT OR UPDATE TRIGGER on a table to check if the data that is inserted already exist?
If yes, then do an UPDATE, else INSERT the new record in to database.
Feb 20 '08 #3
ganeshkumar08
31 New Member
Create a BEFORE INSERT OR UPDATE TRIGGER on a table to check if the data that is inserted already exist?
If yes, then do an UPDATE, else INSERT the new record in to database.
In SQL Server BEFORE INSERT OR UPDATE TRIGGER is available?
If available means can u give me a sample code..
Feb 26 '08 #4
ck9663
2,878 Recognized Expert Specialist
Read more here

-- CK
Feb 26 '08 #5

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

Similar topics

5
1827
by: Mr. B | last post by:
The following code is how I check for duplicates in a List box. This is simple enough as there is only one column of stuff to check. ' Check for Duplicates ' Search listbox (from last to first)...
3
5024
by: Josh Armstrong | last post by:
I need a form to check for duplicates before a new record is added. Table name: Links Field1: LinkSysNum Field2: SysNum For example, =539 is linked to =540 =544 The db is setup using a...
5
2120
by: Jerry | last post by:
Say a record has 15 fields. Is there a better way to check for a duplicate when entering a new record than fourteen "Ands" in the where clause of DCount or FindFirst? Thanks, Jerry
8
3911
by: Iona | last post by:
Hi Allan, I'm using a nifty piece of code you put on here some time back to do a duplicate entry check as below. I'm using to check for duplicate names. However I am getting an error message on...
4
2131
geo039
by: geo039 | last post by:
I tried to write a simple application that takes user input by text and time selected by date time picker. It displays the appt description in one list box and the time in another list box. I wrote...
4
2630
by: giftson.john | last post by:
Hi, I am creating an application which migrates all documents from one repository to another repository. Before migration i have to verify all the documents are unique. No duplicates has to be...
11
5976
by: richardkreidl | last post by:
I'm trying to check for duplicates before I do an INSERT into the Access database table. I basically want to alert the user if the 'ProjectName' and the 'MileStones' are already in the table.. ...
3
2381
by: Lester | last post by:
I'm driving myself crazy with a problem in trying to translate a query written for Access to that for SQL server. I would think that I would use a trigger, but am not sure how to set it up. We...
40
17941
by: kylie991 | last post by:
Hi I am stuck on checking if a 2D array has duplicates. I have to write a function to check if a column has duplicates and then another function to check if the rows have duplicates from a file. ...
1
2135
by: tskmjk55 | last post by:
Recently, I have a requirement to develop a vb.net application wherein the input excel sheet data which has an average of 5000 records should be checked for Internal duplicates (duplicates within the...
0
7257
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
7535
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...
1
7098
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
5682
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,...
1
5084
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...
0
4745
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...
0
3232
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3221
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1591
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.