Author Svein Erling
--- In, "uwekeim" wrote:
> hmmm...let me try to explain what I'm going to to (sorry, my english
> is not very good):
> I have an application, that builds a tree-structure based on a db-
> table, connected via ODBC. Unfortunately I can't change this
> application.
> This app builds the tree ordered by a keynumber (ID). Because I want
> this tree to be ordered by the manufacturer-names, the ID must be
> assigned to the names ordered same way - I hope You see what I
> mean.
> So I built a generator to generate the ID and a "on-insert"-trigger
> into the manufacturer-table.
> Before starting the app, I clear the table, set the generator to 0
> and insert the ordered records from another table, which contains
> the articles of several manufactureres . As result i get the ID
> ordered by names.
> Do You know a better way to solve this task?

Ah, I see, that does kind of make sense. You could try Alans
suggestion or write a stored procedure.