G
Guest
Background: I am creating a catalogue for entries into a livestock show.
The numbering can only be done once all the entries are recieved - they then
need sorting into order (ie into the sections and classes within the section
and then eg into DOB of the exhibitor), after this they need a number
assigned to them which will be printed in a catalogue, and used for judging.
Up till now I have achieved this by creating the catalogue number when
creating a new table, then deleting all the records from the "real" catalogue
table and then copying all the records back ie -
SELECT Catalogue.ClassEntryID, Catalogue.EntryID, Catalogue.ClassId, (Select
Count(*) FROM catalogue A
WHERE A.classentryid <=catalogue.classentryid) AS CatalogueNo,
Catalogue.[Category Running order], Catalogue.[class running order] INTO
tempCatalogue
FROM Catalogue;
Is there any way that I can achieve this result without creating a new table
eg by using an update query? I tried simply using the same expression in an
update query:
UPDATE Catalogue SET Catalogue.CatalogueNo = (Select Count(*) FROM catalogue A
WHERE A.classentryid <=catalogue.classentryid);
But I get an error "Operation must use an updatable query. (Error 3073)",
even though the Catalogue number is not part of a relationship.
Am I going about this the wrong way? Should I be trying to use code??!!
Many thanks
Helen
The numbering can only be done once all the entries are recieved - they then
need sorting into order (ie into the sections and classes within the section
and then eg into DOB of the exhibitor), after this they need a number
assigned to them which will be printed in a catalogue, and used for judging.
Up till now I have achieved this by creating the catalogue number when
creating a new table, then deleting all the records from the "real" catalogue
table and then copying all the records back ie -
SELECT Catalogue.ClassEntryID, Catalogue.EntryID, Catalogue.ClassId, (Select
Count(*) FROM catalogue A
WHERE A.classentryid <=catalogue.classentryid) AS CatalogueNo,
Catalogue.[Category Running order], Catalogue.[class running order] INTO
tempCatalogue
FROM Catalogue;
Is there any way that I can achieve this result without creating a new table
eg by using an update query? I tried simply using the same expression in an
update query:
UPDATE Catalogue SET Catalogue.CatalogueNo = (Select Count(*) FROM catalogue A
WHERE A.classentryid <=catalogue.classentryid);
But I get an error "Operation must use an updatable query. (Error 3073)",
even though the Catalogue number is not part of a relationship.
Am I going about this the wrong way? Should I be trying to use code??!!
Many thanks
Helen