The number of rows in the TOP clause must be an integer - why is this getting raised?
JonCollins
Posts: 4 New member
Ok I'm a novice user so maybe I'm missing something. I've set up a little project to populate some tables from some views I've created elsewhere, replacing values in some of the view columns with Redgate generated values. The views contain between 1k and 20k rows, and I want to take all rows. The previews all look fine but when I Generate Data I get the aforementioned error for every table.
Where is this 'TOP clause' coming from? I'm not (knowingly) restricting the number of rows to read/write.
Any help much appreciated.
Where is this 'TOP clause' coming from? I'm not (knowingly) restricting the number of rows to read/write.
Any help much appreciated.
Tagged:
Answers
I have a workaround, but it's ugly.
Would be nice to think someone might at least have a look...
Is there any information in the following Internet articles help resolve this problem?
https://stackoverflow.com/questions/11420535/issue-using-variable-and-top-clause
https://blog.sqlauthority.com/2013/03/22/sql-server-fix-error-1060-the-number-of-rows-provided-for-a-top-or-fetch-clauses-row-count-parameter-must-be-an-integer/
https://raresql.com/tag/the-number-of-rows-provided-for-a-offset-clause-must-be-an-integer/
I suspect that you may have something incorrect in your query to the view you have configured.
Many Thanks
Eddie
Senior Product Support Engineer
Redgate Software Ltd
Email: support@red-gate.com
Data Generator version 3.1.5.709.
Use identical table as data source for target table.
Specify number of rows by "Same as mapped data".
Generation fails with aforementioned SQL error.
To my mind, it shouldn't be generating a 'TOP' clause at all in this case.