A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Append query duplication despite checking records



 
 
Thread Tools Display Modes
  #1  
Old July 2nd, 2009, 04:18 AM posted to microsoft.public.access
Tom van Stiphout[_2_]
external usenet poster
 
Posts: 1,653
Default Append query duplication despite checking records

On Wed, 1 Jul 2009 07:08:18 -0700 (PDT), Neil Webster
wrote:

If you like you can email me a zipped copy your database, stripped
down to the bare essentials. You should be able to figure out my
..no.spam protection.

-Tom.
Microsoft Access MVP


Tom,

Thanks for the reply.

I've just tried that amendment, but it's still spitting out
duplicates?

Is there something else I've missed?

Cheers

Neil



On 1 July, 14:18, Tom van Stiphout wrote:
On Wed, 1 Jul 2009 05:49:57 -0700 (PDT), Neil Webster

wrote:

Rather than "... and Exists (....) = False"
use:
"... and Not Exists (...)"

-Tom.
Microsoft Access MVP



Hi,


I have a problem that is really bugging me, I'm trying to append
records to a table based on a criteria. *Part of the query checks for
the existence of the the records to be appended in the destination
table.


The problem I'm having is I still end up with duplicates despite this
check.


Can anybody shed any light on where I'm going wrong?


The query I'm using is:
INSERT INTO Intakes2 ( SHAPE, DRN_ID, FROMNODE, TONODE, SHAPE_Length )
SELECT DRN.SHAPE, DRN.DRN_ID, DRN.FROMNODE, DRN.TONODE,
DRN.SHAPE_Length
FROM Intakes2, DRN
WHERE ((([Intakes2]![FROMNODE])=[DRN]![TONODE]) AND ((Exists (select *
from Intakes2 where *Intakes2.DRN_ID =DRN.DRN_ID))=False));


I'm trying to using the query in a python program so would prefer to
keep it as one query/step, I feel it should be possible.


Thanks for any help you can offer.


Cheers


Neil- Hide quoted text -


- Show quoted text -

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:55 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.