PC Review


Reply
Thread Tools Rate Thread

append query to table with autonumber pk

 
 
Mitchell_Collen via AccessMonster.com
Guest
Posts: n/a
 
      7th Jan 2008
Hi,

I know this is probably really simple but I just can't get it at this time. I
have an append query that is supposed to append data to a table. The table
has a pk autonumber. It is set to no index. When I run the query it appends
the same data over causing numerous duplicates. I have thought maybe if I set
the date <> the date of the table to be appended that it would work but then
the access errored and said 0 records appended. Do you know how to get this
working?


INSERT INTO AbsenceRecordHR ( [Date], Employee_Name, Absence_Code, Comment )
SELECT [AbTable].Date, [AbTable].Employee, T3.New_AbsenceTypeCode, [AbTable].
[Absence Type]
FROM T3 INNER JOIN [AbTable] ON T3.Old_AbsenceType = [AbTable].[Absence Type]
;

Thanks in advance, Misty

--
Message posted via http://www.accessmonster.com

 
Reply With Quote
 
 
 
 
Steve Schapel
Guest
Posts: n/a
 
      7th Jan 2008
Misty,

I am confused by this:
"The table has a pk autonumber. It is set to no index."

If it's the pk (Primary Key), then it must be indexed no duplicates -
Access won't allow it to be any other way!

--
Steve Schapel, Microsoft Access MVP

Mitchell_Collen via AccessMonster.com wrote:
> Hi,
>
> I know this is probably really simple but I just can't get it at this time. I
> have an append query that is supposed to append data to a table. The table
> has a pk autonumber. It is set to no index. When I run the query it appends
> the same data over causing numerous duplicates. I have thought maybe if I set
> the date <> the date of the table to be appended that it would work but then
> the access errored and said 0 records appended. Do you know how to get this
> working?
>
>
> INSERT INTO AbsenceRecordHR ( [Date], Employee_Name, Absence_Code, Comment )
> SELECT [AbTable].Date, [AbTable].Employee, T3.New_AbsenceTypeCode, [AbTable].
> [Absence Type]
> FROM T3 INNER JOIN [AbTable] ON T3.Old_AbsenceType = [AbTable].[Absence Type]
> ;
>
> Thanks in advance, Misty
>

 
Reply With Quote
 
Mitchell_Collen via AccessMonster.com
Guest
Posts: n/a
 
      7th Jan 2008
Steve Schapel wrote:
>Misty,
>
>I am confused by this:
>"The table has a pk autonumber. It is set to no index."
>
>If it's the pk (Primary Key), then it must be indexed no duplicates -
>Access won't allow it to be any other way!
>
>> Hi,
>>

>[quoted text clipped - 13 lines]
>>
>> Thanks in advance, Misty


You're right, I worded that wrong. My apologies.
thanks, Misty

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200801/1

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Append query - Append to table with Autonumber field Boon Microsoft Access Queries 2 29th Jun 2009 06:23 PM
Can I 'autonumber' an append query? Andrew Microsoft Access Queries 2 17th Dec 2004 08:42 PM
Append query into a table with an autonumber Stanley Microsoft Access Queries 1 28th Jul 2004 12:45 PM
append query to a table with autonumber Rob Guest Microsoft Access Queries 2 19th Jul 2004 04:58 PM
Resetting Autonumber during Make Table/Append Table Eliphalet Microsoft Access Database Table Design 1 15th Oct 2003 09:11 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:56 PM.