4 Replies Latest reply: Jul 30, 2014 8:42 AM by Jose Tos RSS

    rowno() not working if preceding load added

    Stefan Wühl

      Hi all,

       

      if I use something like this in the script:

       

      LOAD recno() as ID, rowno() as Test

      AutoGenerate 5;


      I get values 1 to 5 in field Test, as expected, right?

       

      ID, Test

      1,1

      2,2

      3,3

      4,4

      5,5

       

       

      Why does this break (IMHO) if I add a preceding load?

       

      LOAD *;

      LOAD recno() as ID, rowno() as Test

      AutoGenerate 5;

       

      returns (tested in QV 11SR1 and some older versions)

       

      ID, Test

      1,0

      2,0

      3,0

      4,0

      5,0

       

       

      Any ideas?

       

      Thanks

      Stefan

       

      P.S. I noticed, that asking 'why' might not be the right questions to ask here in the community, but I am just curious, maybe someone knows...

      Adding to this, I am essentially not interested in workarounds to get Test count from 1 to 5 like in

       

      LOAD ID, rowno() as Test

      LOAD recno() as ID

      AutoGenerate 5;

       

      but to understand if this is a bug in the software or in my understanding of it.