By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,391 Members | 1,653 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,391 IT Pros & Developers. It's quick & easy.

Append Query - Increment Order Number

P: n/a
I created an append query that pushed 100's of orders
form one table into another. I'd like to assign a new
order number to each order as I append them to the new
table based upon the maximum order number already found
in the "append to" table + 1.

Any help is appreciated.

Gregg Horwitz
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
fp
Database queries are set processing and will slam all the records in the db
at the same time so having a consecutive, no-breaking number is impossible
in this instance. To do what you described you would have to do record
processing sequentially. A do loop would solve your problem. Read the
records into a recordset and the add each one to the new db and add 1 to a
counter for your order number.

--
******************************
Fred Parker
Lynn Consulting Group, L.L.C.
http://www.lynnconsultinggroup.com
******************************

"Gregg" <gr****@evidenceaudio.com> wrote in message
news:c1*************************@posting.google.co m...
I created an append query that pushed 100's of orders
form one table into another. I'd like to assign a new
order number to each order as I append them to the new
table based upon the maximum order number already found
in the "append to" table + 1.

Any help is appreciated.

Gregg Horwitz

Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.