Incremental number field in Make Table query

L

Ladybird

I wish to create an Incremental Number field for this Make-Table Query which
is based on the records from another table. So each line of records in the
new Table has an incremented number starting from 1.
Do I use the ALTER TABLE statement? and how...
SQL:
SELECT Tbl_SBUY_TEMP.TITLE, Tbl_SBUY_TEMP.FORMAT, Tbl_SBUY_TEMP.BCPRICE AS
PRICE, Tbl_SBUY_TEMP.SHELFDATE INTO SD_ITEM_IN_TEMP
FROM Tbl_SBUY_TEMP
ORDER BY Tbl_SBUY_TEMP.TITLE;
 
J

John Vinson

I wish to create an Incremental Number field for this Make-Table Query which
is based on the records from another table.

You cannot. An Autonumber isn't available as an option in MakeTable
queries.

One question - WHY? MakeTable queries are, in practice, very rarely
actually necessary. If you wish to create a Report, just base it on a
Select query; you can use a textbox with a Control Source of =1 and
set its Running Sum property to Over All to get a printed line number.

John W. Vinson[MVP]
 
L

Ladybird

Hi
I need to assign an incremental number to the records returned by the query,
that then makes the table. Simply need an incremental number for each
record.
Sure there is a way for this to happen...what is the point of making a
"table" if you are unable to have a unique record identifier (in this case
an incremental number to count the records)
Thanks
 
J

John Vinson

Hi
I need to assign an incremental number to the records returned by the query,
that then makes the table. Simply need an incremental number for each
record.
Sure there is a way for this to happen...what is the point of making a
"table" if you are unable to have a unique record identifier (in this case
an incremental number to count the records)

YOu don't need an incremental counter - or for that matter a table -
in order to count records. That is NOT the function of an autonumber,
and you're going to a great deal of extra effort to do something which
can be done much more simply with a Totals Query!

Could you explain the *business process* that you are trying to
accomplish? I very strongly suspect (if you'ld tell us what you're
trying to accomplish, rather than insisting on a particular -
incorrect in my judgement - way of accomplishing it) that there is a
simpler solution.

John W. Vinson[MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top