Adding 'Autonumber' to query on the fly.

VegaLA

Registered User.
Local time
Today, 12:43
Joined
Jul 12, 2006
Messages
101
Hi all,
I have this select query that pulls out the last 13 distinct values in in descending order from a table. However in order for me to play with these values I need an ID number and ideally i'd like to do this on the fly rather then do a make table and then use that.
Is there any way of adding a 'autonumber' column to a select query on the fly in so that it can be used as reference ?

Thanks in advance,
Mitch...
 
Have you tried adding (autonumber) to the Select command? I did one earlier today where I created a field that was not in a queried table by using some arithimatic operators.

Something like SELECT DISTINCT (field), (autonumber), etc...?
 
do you mean giving a sequence number to a row in a query. this is a staightforward task in SQL. however the sequence is only a temporary column and cannot be used to refer back to the original row although for the technique to wrok it does require a unique in the original record set.
 

Users who are viewing this thread

Back
Top Bottom