Get current row

H

Hai Ly Hoang

Hi,
I have a table ORDER(ID, Item, price).
Now, i want to create a nother table
ORDER_2(No, Item, price) with "No" is a number increase from 1 to the number
of item.
In oracle, it's easy:
SELECT rownum, item, price INTO ORDER_2
FROM ORDER

But Access does not know ROWNUM function, so how to do in access ?
 
J

Jennifer H.

Make the No field Autonumber data type. As long as the
table is empty when you start, the first record will be
1, the second 2 and so on. You just need to select the
Item and Price fields and Access will set the No field
for you.

If you need to repeat the process, delete all the records
from the second table, then compact the database before
running the update. j.
 
Top