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!

AutoNumbers

Status
Not open for further replies.

Djbell

IS-IT--Management
Apr 22, 2002
175
0
0
GB
Hi

I kneed to know a way in which to create Auto-numbers within a query. (I can not use the Auto-numbers in the tables).

For example. I have a query wich selects certain data from a table:-

Query1
Field1 Field2

SERVER1
SERVER2
SERVER3
SERVER4

As you can see there is no data in Field2, I want it to be populated with autonumbers from the information in Field1

Field1 Field2
SERVER1 1
SERVER2 2
SERVER3 3
SERVER4 4

Now I kneed Query2 so that it displays information and creates autonumbers aswell but this time I want the autonumbers to start using the last number used in Query1

Query2

Field1 Field2
GROUP 5
HOME 6
DATA 7
EMAIL 8

Regards

Djbell
 
One way is to send the field1 into a table at field 1 where fielod 2 in that table is an autonumber. Low overhead for large records cos autonumber is fast but u need space on disk to create a table.


 
Hi, Thanks for your reply, but the method you suggested is not pratical for my needs, I would rather create some sort of expression that automaticaly creates the number in a seperate field.

Regards

Djbell
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top