Need display sl no in control table

backhand HSQLDB 2.4 and LibreOffice 5.4.4 with 64 bit

Auto increment primary key sequence number generated in table but during filter with sql query proper sequence slno can’t be displayed in control table view. So what is trick to generate slno sequence 1,2,3,4…so on along with filtered data from database table

This SlNo column of control table of form have not relation with any table. it treated as independent. when data displayed in control table through any query then row numbered in sequence at SlNo column. As filtered data ordered by two or parameter then sequence of SlNo column can’t be extracted from table…

What is your engine? For example, Oracle DB has a ROWNUM pseudocolumn.

Based upon the last few SQL questions, this may not be possible. The manner in which the query result is constructed may have no specific “slno” associated with it. Most of past statements deal with ‘Select Distinct…’ in them. This means the result is not based upon one specific record.

@koolninja You state one type of query displays ‘SlNo’ but another (filtered) doesn’t. Could you provide sample of each?

Please provide a reproducible example. See guidelines for asking.

For example, create Table1 as follows.

SERIALNO  VAL1  VAL2
1         a     aa
2         b     bb
3         a     aa
4         b     cc
5         c     cc
6         a     dd

Now use this query. When asked, enter a for the filter parameter.

SELECT ROWNUM( ), "SERIALNO", "VAL1", "VAL2"
FROM "PUBLIC"."PUBLIC"."Table1" AS "Table1"
WHERE "VAL1" = :param

The result shows sequential numbers 1, 2, 3 for the first column.

rownum 1 2 3