Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Community,
Where exactly we can use rowno() and recno
what we can make the difference with rowno() and recno()
as am trying below scripts but both are getting same results
temp1:
LOAD Date(Today()+RowNo()) as tempdate1
AutoGenerate 10;
temp2:
LOAD Date(Today()+RecNo()) as tempdate2
AutoGenerate 10;
Below is the attachment for your reference
Kindly look at and suggest !
Thanks in adv!!
Satish,
Find the attached example with explanations. Where and How to use it.
Read the help in QlikView Desktop for each function. It clearly states that one function assigns a number to input rows, and the other to internal table rows (e.g. sort of output rows). Since you do not filter any rows (both tables generate and store exaclty 10 rows in each internal table) you will not notice any difference.
Use a WHERE clause to drop some rows, and you will start to see different results.
Peter
From "help":
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 RecNo() refers to your datasource whereas the RowNo() refers to your QlikView dataset.
Satish,
Find the attached example with explanations. Where and How to use it.
Hi satishqlik ,
Use shankarece advise. It is perfect.
HI Satish,
Examples:
Raw data:
Tab1 | |
A | B |
1 | aa |
2 | cc |
3 | ee |
QVTab:
Load *, RecNo( ), RowNo( ) from Tab1 where A<>2;
The resulting QlikView internal table:
QVTab | |||
A | B | RecNo( ) | RowNo( ) |
1 | aa | 1 | 1 |
3 | ee | 3 | 2 |
Hope it Helps You....
Hi,
You cannot see the difference if you are not doing any filtering or sorting? If you use Sorting/Filtering then you will find the diffference.
Instead of inline try with data from SQL or Excel.
RowNo() - returns the sequence of current loading in a query.
RecNo() - returns the actual row number in the table, even you sort it won't change for the recors..
Regards,
Jagan.
Hi Satish
RecNo() gives results according to input table - i.e. Record Number of particular record in input table.
RowNo() gives results on the basis of output - i.e. Row number of particular record in resulting table.
Hope this will help you to understand difference between both.
--
Regards,
Prashant P Baste
In a preceding load situation, you cannot use RowNo() in the last load step - it has no result set to reference, so will always return 0. This will not work:
LOAD A + B As C,
rowno,
;
LOAD A, B,
RowNo() As rowno
From ...
And this will:
LOAD A + B As C,
RowNo() As rowno
;
LOAD A, B,
From ....