473,473 Members | 1,790 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Copying non duplicated data

2 New Member
Hi. I am stuck and was hoping for some help. I am using MSSQL and I need to extract data from one field (A) and append it to a second field (B) but only if the data in (A) does not allready exists in (B). The querry is run many times so the (B) field should only grow when something new is added to (A).
EX.
Field (A) = 123
Field (B) = ""
After first sql command
Field (A) = 123
Field (B) = 123

Field (A) gets changed to
123
456
After second sql command
Filed (B) should be
123
456

not
123
123
456

Any ideas are appreciated - Thanks
Jun 15 '06 #1
1 954
ronverdonk
4,258 Recognized Expert Specialist
I will not ask if field B is in the same row as field A because then you would not need this operation, so I assume that B is in another table.
Since B is an exact copy of A, why don't you just replace the entire column B with column A with an UPDATE tableB... SET B=(SELECT A from tableA) ... ?
Or is this not what you meant?

Ronald :cool:
Jul 20 '06 #2

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

Similar topics

0
by: byrocat | last post by:
I've been setting up a large number of DB2 databse connections, and now need to clone them on to other systems. I'd used the Client Configuration Assistant to export the set (Marked all entries...
1
by: Jonathan | last post by:
I've seen this subject here in a similar fashion, but not in a fashion that can easily be accomplished for my purpose. Simply put, I have a form, I have about 2 dozen fields on this form, that I...
7
by: Amy | last post by:
I'm trying to add an autoincrementing id to a table based on an existing field Name, but Name has duplicated records. How can I do that in ACCESS? Thanks. Amy
5
by: Steve - DND | last post by:
Is there any way to easily deep copy an entire object? Maybe something with unsafe code to make a full and completely duplicated copy of an object with no reference ties to the original? I want...
1
by: anonieko | last post by:
> This is a common problem with some solution > > /*********************************************************************************** * * Problem: * Determine the Duplicated Records in a...
6
by: Niyazi | last post by:
Hi all, What is fastest way removing duplicated value from string array using vb.net? Here is what currently I am doing but the the array contains over 16000 items. And it just do it in 10 or...
0
by: dave k | last post by:
I want to copy data from selected fields in a record on a tabular form (called 'ProductUpdate') to the next record when those two records have a common field - called 'BaseFund' . The selected...
6
by: Ryan Liu | last post by:
Hi, If I have tens of thousands DataRow in a DataTable and allow the end user to pick any DataColumn(s) to check for duplicated lines, the data is so large, is there a better API, algorithm can...
1
by: Chris Ashley | last post by:
Hi, If I create a Bitmap object from a stream, is the data making up the image from that stream duplicated in the Bitmap object, or does the Bitmap just point to the stream somehow without...
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
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
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
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
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
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
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
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.