Ask Your Question

never change the numbers of the first row firebird base libreoffice

asked 2019-10-24 21:02:41 +0100

marcosAoo gravatar image

updated 2019-10-24 21:12:05 +0100

I AM USING LIBREOFFICE BASE WITH FIREBIRD MOTOR I have a query where the names of the planets are sorted in ascending order (ASC)

my problem is that when changing the ascending or descending order of the first column that uses a ROW_NUMBER the numbering of the first column always changes, it is logical.

But I want that no matter how I order the other columns I wish that the first column NEVER CHANGE ORDER, THAT THE FIRST ROW AND FIRST COLUMN ALWAYS BE "1" THE SECOND ROW AND FIRST COLUMN ALWAYS BE "2", THE THIRD ROW AND FIRST COLUMN ALWAYS BE "3" and so on.

I think this attached image says it all and I also attach the database C:\fakepath\15719441156728005.odb image descriptionimage description

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2019-10-24 21:35:59 +0100

Ratslinger gravatar image

updated 2019-10-24 21:39:34 +0100


Just put the query in sequence wanted first then apply the sequence #:

image description

Top is ascending and lower is descending.

Possibly other methods such as How to get record number or rank as part of dataset?
Just tried to get you a quick answer here.

Again, refer to Firebird documentation.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2019-10-24 21:02:41 +0100

Seen: 33 times

Last updated: Oct 24