Forum

This content is now out of date.

Visit Our Community

Active Row Limit & Union Query

It appears as though the Active Row Limit inserts a LIMIT between the master query and the UNION statement in the SQL. This throws an error. When I try to remove the limit from the report by blanking out the field, the SQL will not generate to even review.

I noticed when working with the Ski Data source/view, that the LIMIT clause is not inserted into the SQL.

Our database is Redshift/PostgreSQL. Any suggestions for removing the LIMIT statement without having an unrestricted Data Source?

Hi Nicholas,

Yup the LIMIT function should not be included in the sub-query sql. It should be stripped out, as the LIMIT function is not valid when placed in the sub-query.
I have raised a defect (TASK ID = 155651) so that the LIMIT is placed in the right order. Until then, I guess you cannot use a ROW limit with Redshift and union sub-queries.

However it looks like the data source row limit is also affecting the report, so what you need to do is;

-Set the data source row limit to 'unlimited'
-Blank out the row limit in the report (use the ) .

Please let me know if this does not get it working for you, and apologies for the inconvenience.

Regards,
David
That's the same work around we found and it works. Looking forward to restricting the connection again. :)