Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Rowno( ) and Recno( )

Hello All,

What is difference between Rowno( ) and Recno( ).

QV

Tags (2)
1 Solution

Accepted Solutions
its_anandrjs
Not applicable

Re: Rowno( ) and Recno( )

It is not different see with the example

T1:

LOAD * Inline

[

A,B

1,aa

2,cc

3,ee

];

NoConcatenate

qvtab:

LOAD *,RecNo( ),RowNo( ) Resident A Where A<>2;

DROP Table T1;

When you read the table T1 with A <> 2 then you get below table

Where you see Recno() has only 1 and 3 but Rowno() gives total row loaded in the table.

ABRecNo()RowNo()
1aa11
3ee32
6 Replies
its_anandrjs
Not applicable

Re: Rowno( ) and Recno( )

Have a look it is from help and see the difference.

RecNo( )

Returns an integer for the number of the currently read row of the internal 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 Concatenation to another. The first row is number 1.

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

maxgro
Not applicable

Re: Rowno( ) and Recno( )

from online help

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.

bharath28
Not applicable

Re: Rowno( ) and Recno( )

Not applicable

Re: Rowno( ) and Recno( )

What is difference when both creating the same numbers.

its_anandrjs
Not applicable

Re: Rowno( ) and Recno( )

It is not different see with the example

T1:

LOAD * Inline

[

A,B

1,aa

2,cc

3,ee

];

NoConcatenate

qvtab:

LOAD *,RecNo( ),RowNo( ) Resident A Where A<>2;

DROP Table T1;

When you read the table T1 with A <> 2 then you get below table

Where you see Recno() has only 1 and 3 but Rowno() gives total row loaded in the table.

ABRecNo()RowNo()
1aa11
3ee32
ashfaq_haseeb
Not applicable

Re: Rowno( ) and Recno( )