Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update Query Issue

Status
Not open for further replies.

UberZoot

Technical User
May 31, 2003
29
0
0
US
I am running a SQL query (thanks to Golom) that tracks scheduled vs. actual production in real time updates. I am appending this info to a table so that I can sort completed vs. pending orders with further append/delete queries. I have autonumber (indexed) assigning a designation to each record that is appended to the first table so that no duplicate records will appear on the table. The only problem is that the most recent records generated by the query are not overwriting the existing records in the append table. How can I update these amounts from the original query?
 
The AutoNumber field (if that's your primary key) will have just the opposite effect from your statement. That is, each new record will get a new AutoNumber value making it unique, and then any (or all) other fields in the query may duplicate the corresponding values from existing records if you don't have UNIQUE indexes built on them.

Append does what is says. It APPENDs records to a table; it doesn't modify existing records (including over-writing.)

You need to look at the HELP files for UPDATE and INSERT INTO to clarify the difference.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top