Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

What is the difference between rowno and recno?

pls give replay

5 Replies
Anonymous
Not applicable
Author

Rowno() gives you the row number of the output row.

Recno() gives you the row number of the input row.

The QV Desktop Help describes it well, pasted in below :

RecNo( )

Returns an integer for the number of the currently read row of the source data table. The first record is number 1.

RowNo( )

Returns an integer for the position of the current row in the resulting QlikView internal table. In contrast to RecNo( ), which counts the records in the raw data table, the RowNo( ) function does not count records that are excluded by where clauses and is not reset when a raw data table is concatenated to another. The first row is number 1.

Note!
If you use preceding load, that is, a number of stacked Load statements reading from the same table, you can only use RowNo( ) in the top Load statement. If you use RowNo( ) in subsequent preceding Load statements, 0 is returned.

Examples:

Raw data tables:

Tab1.csv

A

B

1

aa

2

cc

3

ee

Tab2.csv

A

B

5

xx

4

yy

6

zz

QVTab:

Load *, RecNo( ), RowNo( ) from Tab1.csv where A<>2;

Load *, RecNo( ), RowNo( ) from Tab2.csv where A<>5;

The resulting QlikView internal table:

QVTab

A

B

RecNo( )

RowNo( )

1

aa

1

1

3

ee

3

2

4

yy

2

3

6

zz

3

4

hari8088
Creator
Creator

Hi Kumar,

            let us assume we have one table

id,name

1,us

2,uk

3,ind

4,pak

5,ken

the above table if we write rowno(),recno() functions then the output will be like this.

id,name,rowno(),recno()

1,us,1,1

2,uk,2,2

3,ind,3,3

4,pak,4,4

5,ken,5,5

later i delete one row in above table then the out put will be

id,name,rowno(),recno()

1,us,1,1

2,uk,2,2

3,ind,3,3

5,ken,4,5

here rowno() is output and recno() is input

regards,

hari

pratap6699
Creator
Creator

row no() returns the numeric count value from resultant table(output)

recno() returns the numeric count value from loaded source table...(input)

MarcoWedel

Hi,

maybe also helpful:

Counters in the Load

RecNo or RowNo?

regards

Marco

Mario_ES
Contributor III
Contributor III

So for what I see in the example in a Concatenated table, RecNo() returns a value based on the fundamental tables and not the product of the concatenation. Am I right?