R
Red via AccessMonster.com
Good Afternoon all,
I am using an append query to appends data in a table. The query runs, but
replicates the same rows each time it is ran. I'm trying to figure out why
it is creating duplicates. Once the query appends the table once, I dont
want it to do it each and every time the query is ran. I have included my
SQL. Can anyone please point out where I'm going wrong.
NSERT INTO table1 ( Name, sex, Age, [UCA Code], Ward, Prefix, SSN, Service,
Surgeon, Assistant, [Preop Dx], [Procedure], [ASA Class], [X-Ray], comments )
SELECT tblRequest.Name, tblRequest.Sex, tblRequest.Age, tblRequest.[UCA Code],
tblRequest.Ward, tblRequest.Prefix, tblRequest.SSAN, tblRequest.Service,
tblRequest.Surgeon, tblRequest.Assistant, tblRequest.[Pre Op DX], tblRequest.
Procedure, tblRequest.Anestetic, tblRequest.[X-Ray], tblRequest.Comments
FROM tblRequest LEFT JOIN Table1 ON tblRequest.SSAN = Table1.SSN
WHERE (((tblRequest.Approved) Like 2));
As always, your help is truely appreciated.
VR,
Red
I am using an append query to appends data in a table. The query runs, but
replicates the same rows each time it is ran. I'm trying to figure out why
it is creating duplicates. Once the query appends the table once, I dont
want it to do it each and every time the query is ran. I have included my
SQL. Can anyone please point out where I'm going wrong.
NSERT INTO table1 ( Name, sex, Age, [UCA Code], Ward, Prefix, SSN, Service,
Surgeon, Assistant, [Preop Dx], [Procedure], [ASA Class], [X-Ray], comments )
SELECT tblRequest.Name, tblRequest.Sex, tblRequest.Age, tblRequest.[UCA Code],
tblRequest.Ward, tblRequest.Prefix, tblRequest.SSAN, tblRequest.Service,
tblRequest.Surgeon, tblRequest.Assistant, tblRequest.[Pre Op DX], tblRequest.
Procedure, tblRequest.Anestetic, tblRequest.[X-Ray], tblRequest.Comments
FROM tblRequest LEFT JOIN Table1 ON tblRequest.SSAN = Table1.SSN
WHERE (((tblRequest.Approved) Like 2));
As always, your help is truely appreciated.
VR,
Red