G
Guest
Having half understood the reply to an earlier query I have made my query
work - however since I will be using this style of query again I would really
like to understand what I have written!
What I have managed it to run a make table query that puts a sequential
number on each record.
I am producing a catalogue for a show and so I can't use an autonumber since
I won't know the sequence of the records until all exhibitors have entered -
once they are in I can sort them, and I then need to give each entry an
number.
The code I have used is as follows (although personnally I prefer to use the
design grid):
SELECT Catalogue.ClassEntryID, Catalogue.EntryID, Catalogue.ClassID, (Select
Count(*) FROM catalogue A
WHERE A.classentryid <=catalogue.classentryid) AS CatalogueNo,
Catalogue.Position INTO Catalogue2
FROM Catalogue;
Could someone explain where the letter "A" comes from and why the <=
expression.
As I say it works - but I'd like to know more.
Thanks - Helen
work - however since I will be using this style of query again I would really
like to understand what I have written!
What I have managed it to run a make table query that puts a sequential
number on each record.
I am producing a catalogue for a show and so I can't use an autonumber since
I won't know the sequence of the records until all exhibitors have entered -
once they are in I can sort them, and I then need to give each entry an
number.
The code I have used is as follows (although personnally I prefer to use the
design grid):
SELECT Catalogue.ClassEntryID, Catalogue.EntryID, Catalogue.ClassID, (Select
Count(*) FROM catalogue A
WHERE A.classentryid <=catalogue.classentryid) AS CatalogueNo,
Catalogue.Position INTO Catalogue2
FROM Catalogue;
Could someone explain where the letter "A" comes from and why the <=
expression.
As I say it works - but I'd like to know more.
Thanks - Helen